mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Check env stack length before OP_SETUPVAR; ref #3643
This commit is contained in:
@@ -1084,8 +1084,11 @@ RETRY_TRY_BLOCK:
|
||||
if (e) {
|
||||
mrb_value *regs_a = regs + GETARG_A(i);
|
||||
int idx = GETARG_B(i);
|
||||
e->stack[idx] = *regs_a;
|
||||
mrb_write_barrier(mrb, (struct RBasic*)e);
|
||||
|
||||
if (idx < MRB_ENV_STACK_LEN(e)) {
|
||||
e->stack[idx] = *regs_a;
|
||||
mrb_write_barrier(mrb, (struct RBasic*)e);
|
||||
}
|
||||
}
|
||||
NEXT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user