diff options
Diffstat (limited to 'engines/sword25/util/lua/lbaselib.cpp')
-rw-r--r-- | engines/sword25/util/lua/lbaselib.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/sword25/util/lua/lbaselib.cpp b/engines/sword25/util/lua/lbaselib.cpp index 3f0b645164..659c61d956 100644 --- a/engines/sword25/util/lua/lbaselib.cpp +++ b/engines/sword25/util/lua/lbaselib.cpp @@ -6,10 +6,7 @@ -#include <ctype.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "common/util.h" #define lbaselib_c #define LUA_LIB @@ -62,7 +59,7 @@ static int luaB_tonumber (lua_State *L) { luaL_argcheck(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 (Common::isSpace(*s2)) s2++; /* skip trailing spaces */ if (*s2 == '\0') { /* no invalid trailing characters? */ lua_pushnumber(L, (lua_Number)n); return 1; |