Permalink
Browse files

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

  • Loading branch information...
matz committed Sep 23, 2017
1 parent 0ceaa09 commit 7450a774a5f796f7e9d312ba9c9690097f4aa309
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/vm.c
@@ -1329,6 +1329,7 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
if (a > mrb->c->eidx - epos)
a = mrb->c->eidx - epos;
pc = pc + 1;
for (n=0; n<a; n++) {
proc = mrb->c->ensure[epos+n];
irep = proc->body.irep;
@@ -1339,7 +1340,7 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
ci->stackent = mrb->c->stack;
ci->nregs = irep->nregs;
ci->target_class = proc->target_class;
ci->pc = pc + 1;
ci->pc = pc;
ci->acc = ci[-1].nregs;
mrb->c->stack += ci->acc;
stack_extend(mrb, ci->nregs);

0 comments on commit 7450a77

Please sign in to comment.