fix crash on invalid msg

master
Vanessa Ezekowitz 2015-06-10 12:18:50 -04:00
parent ee4a3a39ce
commit c3199a3d2b
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ local on_digiline_receive = function(pos, node, channel, msg)
local meta = minetest.get_meta(pos)
local setchan = meta:get_string("channel")
if setchan ~= channel then return end
local num = tonumber(msg)
local num = tonumber(msg) or 0
if msg == "colon" or msg == "period" or msg == "off" or (num >= 0 and num <= 9) then
minetest.swap_node(pos, { name = "nixie_tubes:tube_"..msg, param2 = node.param2})
end