From eed57c766338d9c6a228ac4f3ffea6530a8b4a1b Mon Sep 17 00:00:00 2001 From: William Venner Date: Tue, 4 Jan 2022 21:56:34 +0000 Subject: [PATCH] Fix invalid pseudoindex --- gmod/src/lua/lua_state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gmod/src/lua/lua_state.rs b/gmod/src/lua/lua_state.rs index c4fd819..713955f 100644 --- a/gmod/src/lua/lua_state.rs +++ b/gmod/src/lua/lua_state.rs @@ -479,7 +479,7 @@ impl LuaState { if has_metatable { self.push_value(-2); self.set_metatable(-2); - self.remove(-2); + self.remove(self.get_top() - 1); } ptr.write(data);