mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
OP_RETURN operand should be stack position of the new scope, not the current scope
This commit is contained in:
+1
-1
@@ -532,7 +532,7 @@ scope_body(codegen_scope *s, node *tree)
|
||||
}
|
||||
else {
|
||||
codegen(scope, tree->cdr, VAL);
|
||||
genop(scope, MKOP_AB(OP_RETURN, cursp(), OP_R_NORMAL));
|
||||
genop(scope, MKOP_AB(OP_RETURN, scope->sp, OP_R_NORMAL));
|
||||
}
|
||||
scope_finish(scope, idx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user