aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/llex.c b/llex.c
index f3c472a3..176e6566 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 2.21 2006/07/11 15:53:29 roberto Exp roberto $ 2** $Id: llex.c,v 2.22 2006/08/30 13:19:58 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*/
@@ -162,7 +162,7 @@ void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, TString *source) {
162 162
163 163
164static int check_next (LexState *ls, const char *set) { 164static int check_next (LexState *ls, const char *set) {
165 if (!strchr(set, ls->current)) 165 if (ls->current == '\0' || !strchr(set, ls->current))
166 return 0; 166 return 0;
167 save_and_next(ls); 167 save_and_next(ls);
168 return 1; 168 return 1;