diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-03-22 19:00:37 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-03-22 19:00:37 -0700 |
| commit | d04f6abb00051465f59be4cda54e593a64923f8e (patch) | |
| tree | f9b8e242b2298bd8b34dd2ba60e24ac14cd946bc /src | |
| parent | a7dc817add5542ec6806484a35cbc57e3ed10629 (diff) | |
| parent | 4656073b600715b58dfde1e64fc481225cf667b2 (diff) | |
| download | mruby-d04f6abb00051465f59be4cda54e593a64923f8e.tar.gz mruby-d04f6abb00051465f59be4cda54e593a64923f8e.zip | |
Merge pull request #1046 from monaka/pr-add-configuration-macro-MRB_PARSER_BUF_SIZE
Add configuration macro MRB_PARSER_BUF_SIZE.
Diffstat (limited to 'src')
| -rw-r--r-- | src/parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parse.y b/src/parse.y index 90a0eeb3b..7694644a9 100644 --- a/src/parse.y +++ b/src/parse.y @@ -3342,7 +3342,7 @@ newtok(parser_state *p) static void tokadd(parser_state *p, int c) { - if (p->bidx < 1024) { + if (p->bidx < MRB_PARSER_BUF_SIZE) { p->buf[p->bidx++] = c; } } @@ -3356,7 +3356,7 @@ toklast(parser_state *p) static void tokfix(parser_state *p) { - if (p->bidx >= 1024) { + if (p->bidx >= MRB_PARSER_BUF_SIZE) { yyerror(p, "string too long (truncated)"); } p->buf[p->bidx] = '\0'; |
