vm.c (cipop): wrong callinfo shifts fixed; ref #5791

This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-09-28 14:03:53 +09:00
parent 5e1c16653f
commit b73802d437
+2 -1
View File
@@ -415,10 +415,11 @@ cipop(mrb_state *mrb)
!MRB_PROC_STRICT_P(b) && MRB_PROC_ENV(b) == CI_ENV(&ci[-1])) {
b->flags |= MRB_PROC_ORPHAN;
}
c->ci--; // exceptions are handled at the method caller; see #3087
if (env && !mrb_env_unshare(mrb, env, TRUE)) {
c->ci--; // exceptions are handled at the method caller; see #3087
mrb_exc_raise(mrb, mrb_obj_value(mrb->nomem_err));
}
c->ci--;
return c->ci;
}