Skip to content

Commit eaada25

Browse files
wpfergusonTurboGit
authored andcommitted
lua/event.c - ensure stack is empty before pushing return value\
1 parent 1ff2bf3 commit eaada25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lua/events.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ static int lua_query_event(lua_State *L)
572572
if(lua_isnoneornil(L, -1))
573573
{
574574
// not found, return false
575-
lua_pop(L, 5);
575+
lua_pop(L, 6);
576576
lua_pushboolean(L, false);
577577
}
578578
else
@@ -591,7 +591,7 @@ static int lua_query_event(lua_State *L)
591591
if(strcmp(luaL_checkstring(L, -1), luaL_checkstring(L, 1)) == 0)
592592
{
593593
// found the index name
594-
lua_pop(L, 6);
594+
lua_pop(L, lua_gettop(L));
595595
lua_pushboolean(L, true);
596596
break;
597597
}

0 commit comments

Comments
 (0)