From e2b8ff26db34bc5a4ff111605880e910fa71f6b8 Mon Sep 17 00:00:00 2001
From: mazmazz <mar.marcoz@outlook.com>
Date: Thu, 20 Dec 2018 10:56:36 -0500
Subject: [PATCH] Fix lua_pop -> lua_remove use in G_SetCustomExitVars lua

---
 src/lua_baselib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lua_baselib.c b/src/lua_baselib.c
index 1a62f39220..4666394edb 100644
--- a/src/lua_baselib.c
+++ b/src/lua_baselib.c
@@ -1934,7 +1934,7 @@ static int lib_gSetCustomExitVars(lua_State *L)
 		if (lua_isnumber(L, 1) || n >= 2)
 		{
 			nextmapoverride = (INT16)luaL_checknumber(L, 1);
-			lua_pop(L, 1); // pop nextmapoverride; skipstats now 1 if available
+			lua_remove(L, 1); // remove nextmapoverride; skipstats now 1 if available
 		}
 		skipstats = lua_optboolean(L, 1);
 	}
-- 
GitLab