diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-06-01 23:56:17 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-06-01 23:56:17 +0900 |
| commit | a0b30fc01f828be699af21dae490219c7f864c70 (patch) | |
| tree | cc5f152024f653ce7515f4a4cee0bb00ff6bf97d /src | |
| parent | d6337e48ad17648b50fc965ba27c99ceea2f258f (diff) | |
| download | mruby-a0b30fc01f828be699af21dae490219c7f864c70.tar.gz mruby-a0b30fc01f828be699af21dae490219c7f864c70.zip | |
OP_RETURN operand should be stack position of the new scope, not the current scope
Diffstat (limited to 'src')
| -rw-r--r-- | src/codegen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.c b/src/codegen.c index 1f4fa818c..505f0ad5b 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -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); |
