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

This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-07-31 22:24:10 +09:00
parent 0166403247
commit c550a0f834
+1 -1
View File
@@ -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)) {
int ai = mrb_gc_arena_save(mrb);
val = p->body.func(mrb, self);
mrb_gc_arena_restore(mrb, ai);
mrb->c->stack = mrb->c->stbase + mrb->c->ci->stackidx;
cipop(mrb);
mrb_gc_arena_restore(mrb, ai);
}
else {
val = mrb_run(mrb, p, self);