aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lbaselib.c b/lbaselib.c
index cbaf3b4e..44dc38e5 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.23 2001/02/09 19:52:24 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.24 2001/02/20 18:29:54 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*/
@@ -100,7 +100,7 @@ static int luaB_tonumber (lua_State *L) {
100 luaL_arg_check(L, 2 <= base && base <= 36, 2, "base out of range"); 100 luaL_arg_check(L, 2 <= base && base <= 36, 2, "base out of range");
101 n = strtoul(s1, &s2, base); 101 n = strtoul(s1, &s2, base);
102 if (s1 != s2) { /* at least one valid digit? */ 102 if (s1 != s2) { /* at least one valid digit? */
103 while (isspace((unsigned char)*s2)) s2++; /* skip trailing spaces */ 103 while (isspace(uchar(*s2))) s2++; /* skip trailing spaces */
104 if (*s2 == '\0') { /* no invalid trailing characters? */ 104 if (*s2 == '\0') { /* no invalid trailing characters? */
105 lua_pushnumber(L, n); 105 lua_pushnumber(L, n);
106 return 1; 106 return 1;