diff options
author | Lua Team <team@lua.org> | 2007-03-23 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2007-03-23 12:00:00 +0000 |
commit | 7e7bc7c7c7f3301a5f837579b81bcac4a2f9cccc (patch) | |
tree | 1038a02147bfbda052210f2b53fa1801b63254eb /src/lstrlib.c | |
parent | 72847ae02f73ea86c1a0d5778a9bc982cdccb821 (diff) | |
download | lua-github-7e7bc7c7c7f3301a5f837579b81bcac4a2f9cccc.tar.gz |
Lua 5.1.2-rc15.1.2-rc1
Diffstat (limited to 'src/lstrlib.c')
-rw-r--r-- | src/lstrlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lstrlib.c b/src/lstrlib.c index f93a8af0..fc7ae489 100644 --- a/src/lstrlib.c +++ b/src/lstrlib.c @@ -1,5 +1,5 @@ /* -** $Id: lstrlib.c,v 1.132 2006/04/26 20:41:19 roberto Exp $ +** $Id: lstrlib.c,v 1.132a 2006/04/26 20:41:19 roberto Exp $ ** Standard library for string operations and pattern-matching ** See Copyright Notice in lua.h */ @@ -723,7 +723,7 @@ static void addquoted (lua_State *L, luaL_Buffer *b, int arg) { static const char *scanformat (lua_State *L, const char *strfrmt, char *form) { const char *p = strfrmt; - while (strchr(FLAGS, *p)) p++; /* skip flags */ + while (*p != '\0' && strchr(FLAGS, *p) != NULL) p++; /* skip flags */ if ((size_t)(p - strfrmt) >= sizeof(FLAGS)) luaL_error(L, "invalid format (repeated flags)"); if (isdigit(uchar(*p))) p++; /* skip width */ |