aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-07-08 17:01:38 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-07-08 17:01:38 -0300
commit32e09c2a16fc57a7b598c48249b60f2ae1dd1a7a (patch)
tree909e916cebb04555764b27011bcf3c62ccdf4618
parentdf19931ddc949e25869092ee00c0091ee7d7643e (diff)
downloadlua-32e09c2a16fc57a7b598c48249b60f2ae1dd1a7a.tar.gz
lua-32e09c2a16fc57a7b598c48249b60f2ae1dd1a7a.tar.bz2
lua-32e09c2a16fc57a7b598c48249b60f2ae1dd1a7a.zip
detail
-rw-r--r--llex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/llex.c b/llex.c
index 046eb2df..3d386da7 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 2.51 2011/07/06 16:45:14 roberto Exp roberto $ 2** $Id: llex.c,v 2.52 2011/07/08 19:17:30 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*/
@@ -314,9 +314,9 @@ static int readhexaesc (LexState *ls) {
314 314
315static int readdecesc (LexState *ls) { 315static int readdecesc (LexState *ls) {
316 int c[3], r; 316 int c[3], r;
317 int i = 0; 317 int i = 2; /* at least two chars will be read */
318 c[i++] = ls->current; /* first char must be a digit */ 318 c[0] = ls->current; /* first char must be a digit */
319 c[i++] = next(ls); /* read second char */ 319 c[1] = next(ls); /* read second char */
320 r = c[0] - '0'; /* partial result */ 320 r = c[0] - '0'; /* partial result */
321 if (lisdigit(c[1])) { 321 if (lisdigit(c[1])) {
322 c[i++] = next(ls); /* read third char */ 322 c[i++] = next(ls); /* read third char */