aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Execution
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-06-28 00:05:48 +0900
committernsfisis <nsfisis@gmail.com>2024-06-28 00:05:48 +0900
commit00925ff256fdf96d3bb259464e771c553c1ffabb (patch)
treebe5544cbdee7276bfe3803bf7734e6cf0d045ac9 /src/Execution
parent73d19c2f4bdae0aac4ebe8303ff88f42a9e59978 (diff)
downloadphp-waddiwasi-00925ff256fdf96d3bb259464e771c553c1ffabb.tar.gz
php-waddiwasi-00925ff256fdf96d3bb259464e771c553c1ffabb.tar.zst
php-waddiwasi-00925ff256fdf96d3bb259464e771c553c1ffabb.zip
fix: handling of loop parameters
Diffstat (limited to 'src/Execution')
-rw-r--r--src/Execution/Runtime.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Execution/Runtime.php b/src/Execution/Runtime.php
index 5b97be3..53a0e8d 100644
--- a/src/Execution/Runtime.php
+++ b/src/Execution/Runtime.php
@@ -2416,10 +2416,10 @@ final class Runtime
$instrs = $instr->body;
$f = $this->stack->currentFrame();
$bt = self::expandBlockType($blockType, $f->module);
- $params = array_reverse($this->stack->popNValues(count($bt->params->types)));
$m = count($bt->params->types);
$l = new Label($m);
while (true) {
+ $params = array_reverse($this->stack->popNValues($m));
$result = $this->execInstrs($instrs, $l, $params);
if ($result === null) {
return null;