diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-12-19 06:05:49 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-12-19 06:05:49 -0800 |
| commit | 7dffeb6215f6274c7c60cb5fde06a3e02405532a (patch) | |
| tree | f186e7f44fe7eb7ec58853759e39ba9455ced8e7 /src | |
| parent | d7a34b625bbcb954b38e24e78958b93a2cc1e249 (diff) | |
| parent | 61ac9ff2eaa9da7d505b17e4ca8a5cbb90d16ea0 (diff) | |
| download | mruby-7dffeb6215f6274c7c60cb5fde06a3e02405532a.tar.gz mruby-7dffeb6215f6274c7c60cb5fde06a3e02405532a.zip | |
Merge pull request #1612 from h2so5/node-case
fix codegen bug in NODE_CASE
Diffstat (limited to 'src')
| -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; |
