Fucking off-by-one error

This commit is contained in:
Mm2PL 2023-02-12 22:48:09 +01:00
parent f3ee061f7f
commit 9e92a795c3

View file

@ -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);
}