From 4656073b600715b58dfde1e64fc481225cf667b2 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Fri, 22 Mar 2013 16:46:56 +0900 Subject: Add configuration macro MRB_PARSER_BUF_SIZE. --- src/parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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'; -- cgit v1.2.3