diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-18 13:06:41 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-18 13:06:41 -0300 |
commit | 8667f29c3b9e56fb6bd4f9de8c096e0331be555d (patch) | |
tree | db2c069c696fdbaa1ad7691f8d8220fdf093c6af | |
parent | d22526ec30c32f7ed422d2cd63d4b5c426769597 (diff) | |
download | lua-8667f29c3b9e56fb6bd4f9de8c096e0331be555d.tar.gz lua-8667f29c3b9e56fb6bd4f9de8c096e0331be555d.tar.bz2 lua-8667f29c3b9e56fb6bd4f9de8c096e0331be555d.zip |
behavior of 'strchr(x, 0)' is ill defined.
-rw-r--r-- | llex.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 | ||
164 | static int check_next (LexState *ls, const char *set) { | 164 | static 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; |