diff options
Diffstat (limited to 'libs/liblua/src/lobject.c')
-rw-r--r-- | libs/liblua/src/lobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/liblua/src/lobject.c b/libs/liblua/src/lobject.c index f8ea917a85..0e504be03e 100644 --- a/libs/liblua/src/lobject.c +++ b/libs/liblua/src/lobject.c @@ -258,7 +258,7 @@ static const char *l_str2d (const char *s, lua_Number *result) { if (endptr == NULL) { /* failed? may be a different locale */ char buff[L_MAXLENNUM + 1]; const char *pdot = strchr(s, '.'); - if (strlen(s) > L_MAXLENNUM || pdot == NULL) + if (pdot == NULL || strlen(s) > L_MAXLENNUM) return NULL; /* string too long or no dot; fail */ strcpy(buff, s); /* copy string to buffer */ buff[pdot - s] = lua_getlocaledecpoint(); /* correct decimal point */ |