Skip to content

Commit

Permalink
on_death: Fix callback number of pushed arguments (Fixes #6451)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallJoker committed Sep 21, 2017
1 parent 080899b commit 67f97f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/script/cpp_api/s_entity.cpp
Expand Up @@ -283,7 +283,7 @@ bool ScriptApiEntity::luaentity_on_death(u16 id, ServerActiveObject *killer)
objectrefGetOrCreate(L, killer); // killer reference

setOriginFromTable(object);
PCALL_RES(lua_pcall(L, 6, 1, error_handler));
PCALL_RES(lua_pcall(L, 2, 1, error_handler));

bool retval = lua_toboolean(L, -1);
lua_pop(L, 2); // Pop object and error handler
Expand Down

0 comments on commit 67f97f8

Please sign in to comment.