aboutsummaryrefslogtreecommitdiff
path: root/lex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-03-21 13:33:47 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-03-21 13:33:47 -0300
commit9284742a11b92dfe4ef011b963240cfa588515cd (patch)
tree96cc498fcc5ec27546fc0738998319c829df55d0 /lex.c
parent9704ff4cb14f34077062447d15196d32ace23e95 (diff)
downloadlua-9284742a11b92dfe4ef011b963240cfa588515cd.tar.gz
lua-9284742a11b92dfe4ef011b963240cfa588515cd.tar.bz2
lua-9284742a11b92dfe4ef011b963240cfa588515cd.zip
better control when growing arrays.
Diffstat (limited to 'lex.c')
-rw-r--r--lex.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lex.c b/lex.c
index 8e744e2c..27049be0 100644
--- a/lex.c
+++ b/lex.c
@@ -1,4 +1,4 @@
1char *rcs_lex = "$Id: lex.c,v 2.30 1996/03/14 15:17:28 roberto Exp roberto $"; 1char *rcs_lex = "$Id: lex.c,v 2.31 1996/03/19 16:50:24 roberto Exp roberto $";
2 2
3 3
4#include <ctype.h> 4#include <ctype.h>
@@ -83,8 +83,7 @@ void luaI_addReserved (void)
83static void growtext (void) 83static void growtext (void)
84{ 84{
85 int size = yytextLast - yytext; 85 int size = yytextLast - yytext;
86 textsize *= 2; 86 textsize = growvector(&yytext, textsize, char, lexEM, MAX_WORD);
87 yytext = growvector(yytext, textsize, char);
88 yytextLast = yytext + size; 87 yytextLast = yytext + size;
89} 88}
90 89