mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-compiler (scope_new): need to initialize nregs; fix #6509
`nregs` should not be smaller than `nlocals`.
This commit is contained in:
@@ -4012,7 +4012,7 @@ scope_new(mrb_state *mrb, codegen_scope *prev, node *nlv)
|
||||
|
||||
s->lv = nlv;
|
||||
s->sp += node_len(nlv)+1; /* add self */
|
||||
s->nlocals = s->sp;
|
||||
s->nlocals = s->nregs = s->sp;
|
||||
if (nlv) {
|
||||
mrb_sym *lv;
|
||||
node *n = nlv;
|
||||
|
||||
Reference in New Issue
Block a user