mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Should not shrink VM stack; fix #3551
This commit is contained in:
@@ -1202,7 +1202,8 @@ RETRY_TRY_BLOCK:
|
||||
else {
|
||||
mrb_value blk = regs[bidx];
|
||||
if (!mrb_nil_p(blk) && mrb_type(blk) != MRB_TT_PROC) {
|
||||
mrb->c->ci->nregs = bidx+1;
|
||||
if(bidx >= mrb->c->ci->nregs)
|
||||
mrb->c->ci->nregs = bidx+1;
|
||||
regs[bidx] = mrb_convert_type(mrb, blk, MRB_TT_PROC, "Proc", "to_proc");
|
||||
}
|
||||
}
|
||||
@@ -1438,7 +1439,8 @@ RETRY_TRY_BLOCK:
|
||||
}
|
||||
blk = regs[bidx];
|
||||
if (!mrb_nil_p(blk) && mrb_type(blk) != MRB_TT_PROC) {
|
||||
ci->nregs = bidx+1;
|
||||
if(bidx >= ci->nregs)
|
||||
ci->nregs = bidx+1;
|
||||
regs[bidx] = mrb_convert_type(mrb, blk, MRB_TT_PROC, "Proc", "to_proc");
|
||||
ci = mrb->c->ci;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user