better encapsulation of some types
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lbaselib.c,v 1.23 2001/02/09 19:52:24 roberto Exp roberto $
|
||||
** $Id: lbaselib.c,v 1.24 2001/02/20 18:29:54 roberto Exp roberto $
|
||||
** Basic library
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -100,7 +100,7 @@ static int luaB_tonumber (lua_State *L) {
|
||||
luaL_arg_check(L, 2 <= base && base <= 36, 2, "base out of range");
|
||||
n = strtoul(s1, &s2, base);
|
||||
if (s1 != s2) { /* at least one valid digit? */
|
||||
while (isspace((unsigned char)*s2)) s2++; /* skip trailing spaces */
|
||||
while (isspace(uchar(*s2))) s2++; /* skip trailing spaces */
|
||||
if (*s2 == '\0') { /* no invalid trailing characters? */
|
||||
lua_pushnumber(L, n);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user