aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
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 8d72cb5e..5ed43493 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 1.76 2001/01/19 13:20:30 roberto Exp roberto $ 2** $Id: llex.c,v 1.77 2001/02/09 20:22:29 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*/
@@ -36,7 +36,7 @@ void luaX_init (lua_State *L) {
36 for (i=0; i<NUM_RESERVED; i++) { 36 for (i=0; i<NUM_RESERVED; i++) {
37 TString *ts = luaS_new(L, token2string[i]); 37 TString *ts = luaS_new(L, token2string[i]);
38 lua_assert(strlen(token2string[i])+1 <= TOKEN_LEN); 38 lua_assert(strlen(token2string[i])+1 <= TOKEN_LEN);
39 ts->marked = (unsigned char)(RESERVEDMARK+i); /* reserved word */ 39 ts->marked = RESERVEDMARK+i; /* reserved word */
40 } 40 }
41} 41}
42 42
@@ -255,7 +255,7 @@ static void read_string (LexState *LS, int del, SemInfo *seminfo) {
255 c = 10*c + (LS->current-'0'); 255 c = 10*c + (LS->current-'0');
256 next(LS); 256 next(LS);
257 } while (++i<3 && isdigit(LS->current)); 257 } while (++i<3 && isdigit(LS->current));
258 if (c != (unsigned char)c) { 258 if (c > UCHAR_MAX) {
259 save(L, '\0', l); 259 save(L, '\0', l);
260 luaX_error(LS, "escape sequence too large", TK_STRING); 260 luaX_error(LS, "escape sequence too large", TK_STRING);
261 } 261 }