Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

register number adjustment for case statement was wrong; close #487

  • Loading branch information...
commit f2da76b6ef3c0d96fa8b1526f96d0037a9411879 1 parent 1bf70ea
@matz matz authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/codegen.c
View
8 src/codegen.c
@@ -1200,17 +1200,17 @@ codegen(codegen_scope *s, node *tree, int val)
genop(s, MKOP_sBx(OP_JMP, 0));
dispatch_linked(s, pos2);
}
- pop();
+ pop(); /* pop HEAD */
codegen(s, tree->car->cdr, val);
- pop();
+ if (val) pop();
tmp = new_label(s);
genop(s, MKOP_sBx(OP_JMP, pos3));
pos3 = tmp;
if (pos1) dispatch(s, pos1);
tree = tree->cdr;
- push();
+ push(); /* push HEAD */
}
- pop();
+ pop(); /* pop HEAD */
genop(s, MKOP_A(OP_LOADNIL, cursp()));
if (val) push();
if (pos3) dispatch_linked(s, pos3);

1 comment on commit f2da76b

@sogabe

Thanks so much. This fix works for me.

Please sign in to comment.
Something went wrong with that request. Please try again.