mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 03:23:45 +01:00
Minimal: Fix HP change crash (#7344)
This commit is contained in:
parent
a1868e8f6c
commit
2edeafb97b
@ -27,6 +27,10 @@ local function run_hpchangereason_tests(player)
|
|||||||
assert(expect == nil)
|
assert(expect == nil)
|
||||||
end
|
end
|
||||||
minetest.register_on_player_hpchange(function(player, hp, reason)
|
minetest.register_on_player_hpchange(function(player, hp, reason)
|
||||||
|
if not expect then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
for key, value in pairs(reason) do
|
for key, value in pairs(reason) do
|
||||||
assert(expect[key] == value)
|
assert(expect[key] == value)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user