mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fiber#yield should check C function boundary; fix #3582
This commit is contained in:
@@ -326,6 +326,7 @@ mrb_fiber_yield(mrb_state *mrb, mrb_int len, const mrb_value *a)
|
||||
mrb_raise(mrb, E_FIBER_ERROR, "can't yield from root fiber");
|
||||
}
|
||||
|
||||
fiber_check_cfunc(mrb, c);
|
||||
c->prev->status = MRB_FIBER_RUNNING;
|
||||
c->status = MRB_FIBER_SUSPENDED;
|
||||
mrb->c = c->prev;
|
||||
|
||||
Reference in New Issue
Block a user