Skip to content

Commit

Permalink
[Minor] Fix Lua stack
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Jun 14, 2023
1 parent cd65f39 commit 678596c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lua/lua_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ lua_map_foreach_cb (gconstpointer key, gconstpointer value, gsize _hits, gpointe

if (lua_pcall(L, 2, 1, 0) != 0) {
msg_err("call to map foreach callback failed: %s", lua_tostring(L, -1));
lua_pop(L, 2); /* error + function */
lua_pop(L, 1); /* error */

return FALSE;
}
Expand All @@ -1117,7 +1117,7 @@ lua_map_foreach_cb (gconstpointer key, gconstpointer value, gsize _hits, gpointe
return lua_toboolean (L, -1);
}

lua_pop (L, 2); /* result + function */
lua_pop (L, 1); /* result */
}

return TRUE;
Expand Down

0 comments on commit 678596c

Please sign in to comment.