From: ShadowNinja Date: Sun, 27 Oct 2013 18:38:44 +0000 (-0400) Subject: Fix crash when entering a non-number for forcefield range X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=cee65bdd2a03fb46493a5262cf46e84da28ee974;p=zefram%2Fminetest%2Ftechnic.git Fix crash when entering a non-number for forcefield range --- 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