From b58602d93dbbe92373bc451916b256cb2c9a4730 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy <roberto@inf.puc-rio.br> Date: Mon, 10 Nov 2014 12:25:52 -0200 Subject: removed unneeded test (result of b_str2int is already checked against length) --- lbaselib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lbaselib.c b/lbaselib.c index fd71a9fc..5c73e4f8 100644 --- a/lbaselib.c +++ b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.305 2014/10/29 16:11:17 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.306 2014/11/02 19:19:04 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -61,8 +61,6 @@ static const char *b_str2int (const char *s, int base, lua_Integer *pn) { s++; } while (isalnum((unsigned char)*s)); s += strspn(s, SPACECHARS); /* skip trailing spaces */ - if (*s != '\0') /* invalid trailing characters? */ - return NULL; *pn = (lua_Integer)((neg) ? (0u - n) : n); return s; } -- cgit v1.2.3-55-g6feb