diff options
Diffstat (limited to 'mrbgems/mruby-compiler/core')
| -rw-r--r-- | mrbgems/mruby-compiler/core/parse.y | 2 | ||||
| -rw-r--r-- | mrbgems/mruby-compiler/core/y.tab.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 3cd74971f..6409f0b3d 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -284,7 +284,7 @@ local_var_p(parser_state *p, mrb_sym sym) int i; if (!v) break; - for (i=0; i < ir->nlocals; i++) { + for (i=0; i+1 < ir->nlocals; i++) { if (v[i] == sym) return TRUE; } if (MRB_PROC_SCOPE_P(u)) break; diff --git a/mrbgems/mruby-compiler/core/y.tab.c b/mrbgems/mruby-compiler/core/y.tab.c index b28509d81..becf886c5 100644 --- a/mrbgems/mruby-compiler/core/y.tab.c +++ b/mrbgems/mruby-compiler/core/y.tab.c @@ -347,7 +347,7 @@ local_var_p(parser_state *p, mrb_sym sym) int i; if (!v) break; - for (i=0; i < ir->nlocals; i++) { + for (i=0; i+1 < ir->nlocals; i++) { if (v[i] == sym) return TRUE; } if (MRB_PROC_SCOPE_P(u)) break; |
