forked from minetest-mods/technic
Fix crash when entering a non-number for forcefield range
This commit is contained in:
parent
704925aa7b
commit
cee65bdd2a
|
@ -68,7 +68,7 @@ end
|
||||||
|
|
||||||
local forcefield_receive_fields = function(pos, formname, fields, sender)
|
local forcefield_receive_fields = function(pos, formname, fields, sender)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local range = fields.range
|
local range = tonumber(fields.range) or 0
|
||||||
|
|
||||||
if fields.toggle then
|
if fields.toggle then
|
||||||
if meta:get_int("enabled") == 1 then
|
if meta:get_int("enabled") == 1 then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user