summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-07-11 18:40:37 +0900
committerYukihiro Matsumoto <[email protected]>2012-07-11 18:40:37 +0900
commit0ebf5c0a6f76da27212b36c908c4187289d6fc24 (patch)
tree1dd748a1734e1b25bd80eb53da491dcd10087b91 /src/parse.y
parent1855c7ae1dfa78264628eeed1c7c96386876fb9b (diff)
downloadmruby-0ebf5c0a6f76da27212b36c908c4187289d6fc24.tar.gz
mruby-0ebf5c0a6f76da27212b36c908c4187289d6fc24.zip
local variable order was screwed up in parser_init_cxt(); close #360
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parse.y b/src/parse.y
index 97c2e6d2e..fe8752ec2 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -4683,11 +4683,11 @@ parser_init_cxt(parser_state *p, mrbc_context *cxt)
if (cxt->lineno) p->lineno = cxt->lineno;
if (cxt->filename) p->filename = cxt->filename;
if (cxt->syms) {
- int len = cxt->slen;
+ int i;
p->locals = cons(0,0);
- while (len--) {
- local_add_f(p, cxt->syms[len]);
+ for (i=0; i<cxt->slen; i++) {
+ local_add_f(p, cxt->syms[i]);
}
}
p->capture_errors = cxt->capture_errors;