mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Ensure size of the stack in OP_CALL.
This commit is contained in:
@@ -1434,14 +1434,13 @@ RETRY_TRY_BLOCK:
|
||||
pool = irep->pool;
|
||||
syms = irep->syms;
|
||||
ci->nregs = irep->nregs;
|
||||
stack_extend(mrb, irep->nregs);
|
||||
if (ci->argc < 0) {
|
||||
if (irep->nregs > 3) {
|
||||
stack_extend(mrb, irep->nregs);
|
||||
stack_clear(regs+3, irep->nregs-3);
|
||||
}
|
||||
}
|
||||
else if (ci->argc+2 < irep->nregs) {
|
||||
stack_extend(mrb, irep->nregs);
|
||||
stack_clear(regs+ci->argc+2, irep->nregs-ci->argc-2);
|
||||
}
|
||||
if (m->env) {
|
||||
|
||||
Reference in New Issue
Block a user