aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-03-06 13:54:42 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-03-06 13:54:42 -0300
commit88a2023c3285c4514519158fba90e644fc6ffca3 (patch)
treeda6611257545c486ff856dd48d66d94e056f3d66 /llex.c
parent5ef1989c4b05aff8362a7ea6ba62aad76d4a040d (diff)
downloadlua-88a2023c3285c4514519158fba90e644fc6ffca3.tar.gz
lua-88a2023c3285c4514519158fba90e644fc6ffca3.tar.bz2
lua-88a2023c3285c4514519158fba90e644fc6ffca3.zip
support for strings with '\0'
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/llex.c b/llex.c
index ef023c3f..5cc90045 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 1.14 1998/01/19 20:18:02 roberto Exp roberto $ 2** $Id: llex.c,v 1.15 1998/02/11 20:56:46 roberto Exp roberto $
3** Lexical Analizer 3** Lexical Analizer
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -358,8 +358,8 @@ int luaY_lex (YYSTYPE *l)
358 } 358 }
359 } 359 }
360 next(LS); /* skip delimiter */ 360 next(LS); /* skip delimiter */
361 save(0); 361 l->pTStr = luaS_newlstr(L->Mbuffbase+1,
362 l->pTStr = luaS_new(L->Mbuffbase+1); 362 L->Mbuffnext-((L->Mbuffbase+1)-L->Mbuffer));
363 L->Mbuffer[L->Mbuffnext-1] = del; /* restore delimiter */ 363 L->Mbuffer[L->Mbuffnext-1] = del; /* restore delimiter */
364 return STRING; 364 return STRING;
365 } 365 }