Skip to content

Commit

Permalink
Callinfo may be changed in ecall(); fix #3589
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Apr 10, 2017
1 parent ab25eae commit a55b237
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,7 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)

for (n=0; n<a && (ci == mrb->c->cibase || eidx > ci[-1].eidx); n++) {
ecall(mrb, --eidx);
ci = mrb->c->ci;
ARENA_RESTORE(mrb, ai);
}
NEXT;
Expand Down Expand Up @@ -1706,6 +1707,7 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
if (ci[0].ridx == ci[-1].ridx) {
while (eidx > ci[-1].eidx) {
ecall(mrb, --eidx);
ci = mrb->c->ci;
}
}
}
Expand Down

0 comments on commit a55b237

Please sign in to comment.