mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #5782 from haramako/crash-on-resume-from-cfunc
Protect when call Fiber#resume from C function.
This commit is contained in:
@@ -267,6 +267,7 @@ fiber_resume(mrb_state *mrb, mrb_value self)
|
||||
mrb_int len;
|
||||
mrb_bool vmexec = FALSE;
|
||||
|
||||
fiber_check_cfunc(mrb, mrb->c);
|
||||
mrb_get_args(mrb, "*!", &a, &len);
|
||||
if (mrb->c->ci->cci > 0) {
|
||||
vmexec = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user