diff options
author | davidflanagan <davidflanagan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-25 05:08:08 +0000 |
---|---|---|
committer | davidflanagan <davidflanagan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-25 05:08:08 +0000 |
commit | 966e15e655098152eb9b66d18bd43f7de9061550 (patch) | |
tree | f4ddb6cdc7fcb40577dc94702c06f436888aec35 /parse.y | |
parent | 1c662c2b63a224539dfd9aaa57203d61d9b341f3 (diff) | |
download | ruby-966e15e655098152eb9b66d18bd43f7de9061550.tar.gz |
* parse.y (parser_tokspace): increment tokidx
fixes test failure at [test/ruby/test_stringchar.rb:72]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -4917,13 +4917,13 @@ parser_newtok(struct parser_params *parser) static char * parser_tokspace(struct parser_params *parser, int n) { - int idx = tokidx + n; + tokidx += n; - if (idx >= toksiz) { - do {toksiz *= 2;} while (toksiz < idx); + if (tokidx >= toksiz) { + do {toksiz *= 2;} while (toksiz < tokidx); REALLOC_N(tokenbuf, char, toksiz); } - return &tokenbuf[tokidx]; + return &tokenbuf[tokidx-n]; } static void |