diff options
| author | h2so5 <[email protected]> | 2013-12-19 21:30:51 +0900 |
|---|---|---|
| committer | h2so5 <[email protected]> | 2013-12-19 21:30:51 +0900 |
| commit | 61ac9ff2eaa9da7d505b17e4ca8a5cbb90d16ea0 (patch) | |
| tree | 754cba3fe9db0338741c1988fbe722a03df2eb11 | |
| parent | 8cd42f64665b08fb35ee7fb5e69057be07dc7c76 (diff) | |
| download | mruby-61ac9ff2eaa9da7d505b17e4ca8a5cbb90d16ea0.tar.gz mruby-61ac9ff2eaa9da7d505b17e4ca8a5cbb90d16ea0.zip | |
fix codegen bug in NODE_CASE
| -rw-r--r-- | src/codegen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/codegen.c b/src/codegen.c index ef3a716f9..dc80f2592 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -1409,10 +1409,13 @@ codegen(codegen_scope *s, node *tree, int val) tree = tree->cdr; } if (val) { + int pos = cursp(); genop(s, MKOP_A(OP_LOADNIL, cursp())); + if (pos3) dispatch_linked(s, pos3); + pop(); + genop(s, MKOP_AB(OP_MOVE, cursp(), pos)); push(); } - if (pos3) dispatch_linked(s, pos3); } break; |
