aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-07-10 17:43:53 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-07-10 17:43:53 -0300
commita8c9eec4260ced4aa69048d92766d55026135b22 (patch)
tree21ea0b675801ec5f277649575b2c65c3dd521dc6
parenta885b826b31eb77015a1d9a20d7f8594a4c2b51b (diff)
downloadlua-a8c9eec4260ced4aa69048d92766d55026135b22.tar.gz
lua-a8c9eec4260ced4aa69048d92766d55026135b22.tar.bz2
lua-a8c9eec4260ced4aa69048d92766d55026135b22.zip
bug: chunk can end just after a '\' in a string
-rw-r--r--llex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/llex.c b/llex.c
index 7030e62d..27f11134 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 1.106 2002/06/25 19:18:20 roberto Exp roberto $ 2** $Id: llex.c,v 1.107 2002/07/08 18:14:36 roberto Exp roberto $
3** Lexical Analyzer 3** Lexical Analyzer
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -273,6 +273,7 @@ static void read_string (LexState *LS, int del, SemInfo *seminfo) {
273 case 't': save(L, '\t', l); next(LS); break; 273 case 't': save(L, '\t', l); next(LS); break;
274 case 'v': save(L, '\v', l); next(LS); break; 274 case 'v': save(L, '\v', l); next(LS); break;
275 case '\n': save(L, '\n', l); inclinenumber(LS); break; 275 case '\n': save(L, '\n', l); inclinenumber(LS); break;
276 case EOZ: break; /* will raise an error next loop */
276 default: { 277 default: {
277 if (!isdigit(LS->current)) 278 if (!isdigit(LS->current))
278 save_and_next(L, LS, l); /* handles \\, \", \', and \? */ 279 save_and_next(L, LS, l); /* handles \\, \", \', and \? */