mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #521 from iij/pr-fix-broken-variable-ref-next-statement
fix: broken variable reference, use 'next' statement
This commit is contained in:
+4
-2
@@ -1556,8 +1556,10 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
genop(s, MKOP_sBx(OP_JMP, s->loop->pc1 - s->pc));
|
||||
}
|
||||
else {
|
||||
codegen(s, tree, VAL);
|
||||
pop();
|
||||
if (tree) {
|
||||
codegen(s, tree, VAL);
|
||||
pop();
|
||||
}
|
||||
genop_peep(s, MKOP_AB(OP_RETURN, cursp(), OP_R_NORMAL), NOVAL);
|
||||
}
|
||||
if (val) push();
|
||||
|
||||
Reference in New Issue
Block a user