mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #1612 from h2so5/node-case
fix codegen bug in NODE_CASE
This commit is contained in:
+4
-1
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user