From 88a2023c3285c4514519158fba90e644fc6ffca3 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 6 Mar 1998 13:54:42 -0300 Subject: support for strings with '\0' --- llex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llex.c') diff --git a/llex.c b/llex.c index ef023c3f..5cc90045 100644 --- a/llex.c +++ b/llex.c @@ -1,5 +1,5 @@ /* -** $Id: llex.c,v 1.14 1998/01/19 20:18:02 roberto Exp roberto $ +** $Id: llex.c,v 1.15 1998/02/11 20:56:46 roberto Exp roberto $ ** Lexical Analizer ** See Copyright Notice in lua.h */ @@ -358,8 +358,8 @@ int luaY_lex (YYSTYPE *l) } } next(LS); /* skip delimiter */ - save(0); - l->pTStr = luaS_new(L->Mbuffbase+1); + l->pTStr = luaS_newlstr(L->Mbuffbase+1, + L->Mbuffnext-((L->Mbuffbase+1)-L->Mbuffer)); L->Mbuffer[L->Mbuffnext-1] = del; /* restore delimiter */ return STRING; } -- cgit v1.2.3-55-g6feb