From cee65bdd2a03fb46493a5262cf46e84da28ee974 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Sun, 27 Oct 2013 14:38:44 -0400 Subject: [PATCH] Fix crash when entering a non-number for forcefield range --- technic/machines/HV/forcefield.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2