mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Type check before traversing irep->outer; fix #3782
This commit is contained in:
+1
-1
@@ -853,7 +853,7 @@ mrb_vm_const_get(mrb_state *mrb, mrb_sym sym)
|
||||
if (c2->tt == MRB_TT_CLASS || c2->tt == MRB_TT_MODULE) c = c2;
|
||||
mrb_assert(!MRB_PROC_CFUNC_P(mrb->c->ci->proc));
|
||||
proc = mrb->c->ci->proc->body.irep->outer;
|
||||
while (proc) {
|
||||
while (proc && proc->tt == MRB_TT_PROC) {
|
||||
mrb_assert(!MRB_PROC_CFUNC_P(proc));
|
||||
if (MRB_PROC_CLASS_P(proc) && proc->target_class) {
|
||||
c2 = proc->target_class;
|
||||
|
||||
Reference in New Issue
Block a user