From e719ed60b8bf19a0c9a68fcf2590b1c807317719 Mon Sep 17 00:00:00 2001 From: number Zero Date: Wed, 10 Jan 2018 20:10:52 +0300 Subject: [PATCH] Double-check --- mesecons_luacontroller/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua index bdca406..2a5b117 100644 --- a/mesecons_luacontroller/init.lua +++ b/mesecons_luacontroller/init.lua @@ -550,7 +550,11 @@ local digiline = { receptor = {}, effector = { action = function(pos, node, channel, msg) - run(pos, {type = "digiline", channel = channel, msg = msg}) + if (type(channel) ~= "string" and type(channel) ~= "number" and type(channel) ~= "boolean") then + return + end + local clean_msg = safe_deep_copy(msg, mesecon.setting("luacontroller_digiline_maxlen", 50000)) + run(pos, {type = "digiline", channel = channel, msg = clean_msg}) end } }