mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Check if ci->proc is not NULL and MRB_PROC_CFUNC_P(); fix #3867
This commit is contained in:
@@ -327,7 +327,8 @@ ecall(mrb_state *mrb)
|
||||
mrb_assert(!MRB_PROC_CFUNC_P(p));
|
||||
c->ensure[i] = NULL;
|
||||
nregs = p->upper->body.irep->nregs;
|
||||
if (ci->proc->body.irep->nregs > nregs) {
|
||||
if (ci->proc && !MRB_PROC_CFUNC_P(ci->proc) &&
|
||||
ci->proc->body.irep->nregs > nregs) {
|
||||
nregs = ci->proc->body.irep->nregs;
|
||||
}
|
||||
cioff = ci - c->cibase;
|
||||
|
||||
Reference in New Issue
Block a user