diff options
Diffstat (limited to 'lobject.c')
| -rw-r--r-- | lobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.c,v 2.110 2016/05/02 14:00:32 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 2.111 2016/05/20 14:07:48 roberto Exp roberto $ |
| 3 | ** Some generic functions over Lua objects | 3 | ** Some generic functions over Lua objects |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -280,7 +280,7 @@ static const char *l_str2d (const char *s, lua_Number *result) { | |||
| 280 | endptr = l_str2dloc(s, result, mode); /* try to convert */ | 280 | endptr = l_str2dloc(s, result, mode); /* try to convert */ |
| 281 | if (endptr == NULL) { /* failed? may be a different locale */ | 281 | if (endptr == NULL) { /* failed? may be a different locale */ |
| 282 | char buff[L_MAXLENNUM + 1]; | 282 | char buff[L_MAXLENNUM + 1]; |
| 283 | char *pdot = strchr(s, '.'); | 283 | const char *pdot = strchr(s, '.'); |
| 284 | if (strlen(s) > L_MAXLENNUM || pdot == NULL) | 284 | if (strlen(s) > L_MAXLENNUM || pdot == NULL) |
| 285 | return NULL; /* string too long or no dot; fail */ | 285 | return NULL; /* string too long or no dot; fail */ |
| 286 | strcpy(buff, s); /* copy string to buffer */ | 286 | strcpy(buff, s); /* copy string to buffer */ |
