diff options
| -rw-r--r-- | lbaselib.c | 4 |
1 files changed, 1 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbaselib.c,v 1.305 2014/10/29 16:11:17 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.306 2014/11/02 19:19:04 roberto Exp roberto $ |
| 3 | ** Basic library | 3 | ** Basic library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -61,8 +61,6 @@ static const char *b_str2int (const char *s, int base, lua_Integer *pn) { | |||
| 61 | s++; | 61 | s++; |
| 62 | } while (isalnum((unsigned char)*s)); | 62 | } while (isalnum((unsigned char)*s)); |
| 63 | s += strspn(s, SPACECHARS); /* skip trailing spaces */ | 63 | s += strspn(s, SPACECHARS); /* skip trailing spaces */ |
| 64 | if (*s != '\0') /* invalid trailing characters? */ | ||
| 65 | return NULL; | ||
| 66 | *pn = (lua_Integer)((neg) ? (0u - n) : n); | 64 | *pn = (lua_Integer)((neg) ? (0u - n) : n); |
| 67 | return s; | 65 | return s; |
| 68 | } | 66 | } |
