aboutsummaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lstrlib.c b/lstrlib.c
index 255bc51f..2efed9c0 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.162 2011/01/12 20:36:01 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.163 2011/01/26 16:30:02 roberto Exp roberto $
3** Standard library for string operations and pattern-matching 3** Standard library for string operations and pattern-matching
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -808,7 +808,7 @@ static void addquoted (lua_State *L, luaL_Buffer *b, int arg) {
808static const char *scanformat (lua_State *L, const char *strfrmt, char *form) { 808static const char *scanformat (lua_State *L, const char *strfrmt, char *form) {
809 const char *p = strfrmt; 809 const char *p = strfrmt;
810 while (*p != '\0' && strchr(FLAGS, *p) != NULL) p++; /* skip flags */ 810 while (*p != '\0' && strchr(FLAGS, *p) != NULL) p++; /* skip flags */
811 if ((size_t)(p - strfrmt) >= sizeof(FLAGS)) 811 if ((size_t)(p - strfrmt) >= sizeof(FLAGS)/sizeof(char))
812 luaL_error(L, "invalid format (repeated flags)"); 812 luaL_error(L, "invalid format (repeated flags)");
813 if (isdigit(uchar(*p))) p++; /* skip width */ 813 if (isdigit(uchar(*p))) p++; /* skip width */
814 if (isdigit(uchar(*p))) p++; /* (2 digits at most) */ 814 if (isdigit(uchar(*p))) p++; /* (2 digits at most) */