From ca66c5e7ee624a43551c055042ff35aa69fba329 Mon Sep 17 00:00:00 2001
From: Zachary McAlpin <choalover@gmail.com>
Date: Fri, 5 Jun 2020 13:18:22 -0500
Subject: [PATCH] Updated LUAh_GameQuit

---
 src/lua_hooklib.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c
index 62bb5b6639..0d8aa1ffb6 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));
-- 
GitLab