Commit 61ac9ff2 authored by h2so5's avatar h2so5

fix codegen bug in NODE_CASE

parent 8cd42f64
...@@ -1409,10 +1409,13 @@ codegen(codegen_scope *s, node *tree, int val) ...@@ -1409,10 +1409,13 @@ codegen(codegen_scope *s, node *tree, int val)
tree = tree->cdr; tree = tree->cdr;
} }
if (val) { if (val) {
int pos = cursp();
genop(s, MKOP_A(OP_LOADNIL, cursp())); genop(s, MKOP_A(OP_LOADNIL, cursp()));
if (pos3) dispatch_linked(s, pos3);
pop();
genop(s, MKOP_AB(OP_MOVE, cursp(), pos));
push(); push();
} }
if (pos3) dispatch_linked(s, pos3);
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment