diff --git a/Source/Script/LuaScript.cpp b/Source/Script/LuaScript.cpp index c94505f8a..68e3c6dcf 100644 --- a/Source/Script/LuaScript.cpp +++ b/Source/Script/LuaScript.cpp @@ -1242,7 +1242,7 @@ std::list LuaScript::TableKeys(std::string_view name) { lua_pushnil(this->m_state); while (lua_next(this->m_state, -2)) { - keys.push_back(static_cast(lua_tonumber(this->m_state, -2))); + keys.push_back(lua_tointeger(this->m_state, -2)); lua_pop(this->m_state, 1); }