Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Minimal: Fix HP change crash (#7344)
  • Loading branch information
SmallJoker committed May 16, 2018
1 parent a1868e8 commit 2edeafb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions games/minimal/mods/test/init.lua
Expand Up @@ -27,6 +27,10 @@ local function run_hpchangereason_tests(player)
assert(expect == nil)
end
minetest.register_on_player_hpchange(function(player, hp, reason)
if not expect then
return
end

for key, value in pairs(reason) do
assert(expect[key] == value)
end
Expand Down

0 comments on commit 2edeafb

Please sign in to comment.