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

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-04-10 20:39:49 +09:00
parent ab25eaea23
commit a55b237d89
+2
View File
@@ -1161,6 +1161,7 @@ RETRY_TRY_BLOCK:
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 @@ RETRY_TRY_BLOCK:
if (ci[0].ridx == ci[-1].ridx) {
while (eidx > ci[-1].eidx) {
ecall(mrb, --eidx);
ci = mrb->c->ci;
}
}
}