Commit 35699424 authored by Kouki Ooyatsu's avatar Kouki Ooyatsu

fix: broken variable reference, use 'next' statement

 Because the tree is gone pop() even if it is empty.
parent b720156c
......@@ -1556,8 +1556,10 @@ codegen(codegen_scope *s, node *tree, int val)
genop(s, MKOP_sBx(OP_JMP, s->loop->pc1 - s->pc));
}
else {
if (tree) {
codegen(s, tree, VAL);
pop();
}
genop_peep(s, MKOP_AB(OP_RETURN, cursp(), OP_R_NORMAL), NOVAL);
}
if (val) push();
......
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