aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/util_commands/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'games/devtest/mods/util_commands/init.lua')
-rw-r--r--games/devtest/mods/util_commands/init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/games/devtest/mods/util_commands/init.lua b/games/devtest/mods/util_commands/init.lua
index c37364042..4f80172c6 100644
--- a/games/devtest/mods/util_commands/init.lua
+++ b/games/devtest/mods/util_commands/init.lua
@@ -28,7 +28,7 @@ minetest.register_chatcommand("hp", {
return false, "No player."
end
local hp = tonumber(param)
- if not hp then
+ if not hp or minetest.is_nan(hp) or hp < 0 or hp > 65535 then
return false, "Missing or incorrect hp parameter!"
end
player:set_hp(hp)