minor fix

This commit is contained in:
云风
2012-08-24 16:05:30 +08:00
parent e81a146385
commit 6554e4612a
2 changed files with 23 additions and 9 deletions

View File

@@ -151,7 +151,7 @@ int64_new(lua_State *L) {
if (base < 2) {
luaL_error(L, "base must be >= 2");
}
const char * str = lua_tostring(L, 1);
const char * str = luaL_checkstring(L, 1);
n = strtoll(str, NULL, base);
_pushint64(L,n);
break;