1
0
mirror of https://github.com/mt-mods/led_marquee.git synced 2024-11-14 05:40:22 +01:00

Merge branch 'master' into 'master'

fix crash when "scroll_speed" is not a number

See merge request VanessaE/led_marquee!5
This commit is contained in:
Vanessa Dannenberg 2020-09-09 10:29:17 +00:00
commit 642aec419a

View File

@ -360,7 +360,7 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
led_marquee.set_timer(pos, 0)
return
elseif string.sub(msg, 1, 12) == "scroll_speed" then
local timeout = tonumber(string.sub(msg, 13))
local timeout = tonumber(string.sub(msg, 13)) or 0
led_marquee.set_timer(pos, math.max(timeout, led_marquee.message_minimum_time))
elseif string.sub(msg, 1, 11) == "scroll_step" then
local skip = tonumber(string.sub(msg, 12))