Permalink
Browse files

Callinfo may be changed in `ecall()`; fix #3589

  • Loading branch information...
matz committed Apr 10, 2017
1 parent ab25eae commit a55b237d89e1397da8dc879b24c1a34e80ad4e91
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/vm.c
View
@@ -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;
@@ -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;
}
}
}

0 comments on commit a55b237

Please sign in to comment.