on_death: Fix callback number of pushed arguments (Fixes #6451)

This commit is contained in:
SmallJoker 2017-09-21 19:56:11 +02:00
parent 080899b0f1
commit 67f97f8d32

@ -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