The first instruction was skipped mistakenly in ensure clause; fix #3811

parent 0ceaa096
...@@ -1329,6 +1329,7 @@ RETRY_TRY_BLOCK: ...@@ -1329,6 +1329,7 @@ RETRY_TRY_BLOCK:
if (a > mrb->c->eidx - epos) if (a > mrb->c->eidx - epos)
a = mrb->c->eidx - epos; a = mrb->c->eidx - epos;
pc = pc + 1;
for (n=0; n<a; n++) { for (n=0; n<a; n++) {
proc = mrb->c->ensure[epos+n]; proc = mrb->c->ensure[epos+n];
irep = proc->body.irep; irep = proc->body.irep;
...@@ -1339,7 +1340,7 @@ RETRY_TRY_BLOCK: ...@@ -1339,7 +1340,7 @@ RETRY_TRY_BLOCK:
ci->stackent = mrb->c->stack; ci->stackent = mrb->c->stack;
ci->nregs = irep->nregs; ci->nregs = irep->nregs;
ci->target_class = proc->target_class; ci->target_class = proc->target_class;
ci->pc = pc + 1; ci->pc = pc;
ci->acc = ci[-1].nregs; ci->acc = ci[-1].nregs;
mrb->c->stack += ci->acc; mrb->c->stack += ci->acc;
stack_extend(mrb, ci->nregs); stack_extend(mrb, ci->nregs);
......
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