diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c index 62bb5b66393482306e617760dad8b6bdb222cba5..0d8aa1ffb68e85cd9cab62d5f2632978419aa006 100644 --- a/src/lua_hooklib.c +++ b/src/lua_hooklib.c @@ -1783,8 +1783,7 @@ void LUAh_GameQuit(void) if (hookp->type != hook_GameQuit) continue; - lua_pushfstring(gL, FMT_HOOKID, hookp->id); - lua_gettable(gL, LUA_REGISTRYINDEX); + PushHook(gL, hookp); if (lua_pcall(gL, 0, 0, 0)) { if (!hookp->error || cv_debug & DBG_LUA) CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));