From 9e92a795c3dc56eb6029b712a29c42b9ad9e8f35 Mon Sep 17 00:00:00 2001 From: Mm2PL Date: Sun, 12 Feb 2023 22:48:09 +0100 Subject: [PATCH] Fucking off-by-one error --- src/controllers/plugins/LuaUtilities.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/plugins/LuaUtilities.hpp b/src/controllers/plugins/LuaUtilities.hpp index 817b11386..1abb820c3 100644 --- a/src/controllers/plugins/LuaUtilities.hpp +++ b/src/controllers/plugins/LuaUtilities.hpp @@ -148,7 +148,7 @@ bool pop(lua_State *L, T *out, StackIdx idx = -1) { if (idx < 0) { - idx = lua_gettop(L) + idx; + idx = lua_gettop(L) + idx + 1; } lua_remove(L, idx); }