diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-07-08 17:01:38 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-07-08 17:01:38 -0300 |
| commit | 32e09c2a16fc57a7b598c48249b60f2ae1dd1a7a (patch) | |
| tree | 909e916cebb04555764b27011bcf3c62ccdf4618 | |
| parent | df19931ddc949e25869092ee00c0091ee7d7643e (diff) | |
| download | lua-32e09c2a16fc57a7b598c48249b60f2ae1dd1a7a.tar.gz lua-32e09c2a16fc57a7b598c48249b60f2ae1dd1a7a.tar.bz2 lua-32e09c2a16fc57a7b598c48249b60f2ae1dd1a7a.zip | |
detail
| -rw-r--r-- | llex.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -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 | ||
| 315 | static int readdecesc (LexState *ls) { | 315 | static 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 */ |
