move mrb_gc_arena_restore() after cipop(); a bug found by Kilo Kawai

parent 01664032
...@@ -386,9 +386,9 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, int argc, mr ...@@ -386,9 +386,9 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, int argc, mr
if (MRB_PROC_CFUNC_P(p)) { if (MRB_PROC_CFUNC_P(p)) {
int ai = mrb_gc_arena_save(mrb); int ai = mrb_gc_arena_save(mrb);
val = p->body.func(mrb, self); val = p->body.func(mrb, self);
mrb_gc_arena_restore(mrb, ai);
mrb->c->stack = mrb->c->stbase + mrb->c->ci->stackidx; mrb->c->stack = mrb->c->stbase + mrb->c->ci->stackidx;
cipop(mrb); cipop(mrb);
mrb_gc_arena_restore(mrb, ai);
} }
else { else {
val = mrb_run(mrb, p, self); val = mrb_run(mrb, p, self);
......
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