summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowNinja <noreply@gmail.com>2013-10-27 14:38:44 -0400
committerShadowNinja <noreply@gmail.com>2013-10-27 14:39:45 -0400
commitcee65bdd2a03fb46493a5262cf46e84da28ee974 (patch)
treedd671ec35b90ed4db6b69845f5ab5fd1fafbf3fb
parent704925aa7b2dc78dd7af86b71e0a95a64b3afce1 (diff)
Fix crash when entering a non-number for forcefield range
-rw-r--r--technic/machines/HV/forcefield.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/technic/machines/HV/forcefield.lua b/technic/machines/HV/forcefield.lua
index fe9c8ea..dd9f8ef 100644
--- a/technic/machines/HV/forcefield.lua
+++ b/technic/machines/HV/forcefield.lua
@@ -68,7 +68,7 @@ end
local forcefield_receive_fields = function(pos, formname, fields, sender)
local meta = minetest.get_meta(pos)
- local range = fields.range
+ local range = tonumber(fields.range) or 0
if fields.toggle then
if meta:get_int("enabled") == 1 then