Use lua_isinteger instead

This commit is contained in:
Cloud Wu
2021-10-13 15:41:30 +08:00
parent 0e11c78575
commit 58da8a1a22

View File

@@ -518,7 +518,7 @@ is_rawarray(lua_State *L) {
// empty table
return false;
}
lua_Integer firstkey = (lua_type(L, -2) == LUA_TNUMBER) ? lua_tointeger(L, -2) : 0;
lua_Integer firstkey = lua_isinteger(L, -2) ? lua_tointeger(L, -2) : 0;
lua_pop(L, 2);
if (firstkey != 1)
return false;