diff options
| author | Masaki Muranaka <[email protected]> | 2013-03-22 16:46:56 +0900 |
|---|---|---|
| committer | Masaki Muranaka <[email protected]> | 2013-03-22 16:46:56 +0900 |
| commit | 4656073b600715b58dfde1e64fc481225cf667b2 (patch) | |
| tree | 44867092afd875c4577f365f1f42c6c5b66f012f /src | |
| parent | b547a7ed2cc781500a572b3a24fdfba7aed85e40 (diff) | |
| download | mruby-4656073b600715b58dfde1e64fc481225cf667b2.tar.gz mruby-4656073b600715b58dfde1e64fc481225cf667b2.zip | |
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'; |
