projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1868e8
)
Minimal: Fix HP change crash (#7344)
author
SmallJoker
<mk939@ymail.com>
Wed, 16 May 2018 17:36:30 +0000
(19:36 +0200)
committer
SmallJoker
<mk939@ymail.com>
Wed, 16 May 2018 17:44:21 +0000
(19:44 +0200)
games/minimal/mods/test/init.lua
patch
|
blob
|
history
diff --git
a/games/minimal/mods/test/init.lua
b/games/minimal/mods/test/init.lua
index 3141b4cf329d329b23d80fc8ad33148e2b9afd66..4806ba4fca0cb88a91bf0a05cd4d7b653d1d12d3 100644
(file)
--- a/
games/minimal/mods/test/init.lua
+++ b/
games/minimal/mods/test/init.lua
@@
-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