summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2017-02-05 19:28:57 -0600
committercheapie <no-email-for-you@example.com>2017-02-05 19:28:57 -0600
commit0724796e51ed655b37c4a80f60c66087c7d16efc (patch)
tree61465c0f54d1de4e3ebbe2d8239b0f256115fb7c
parent09680bbff8f2209b831f1bed0bf99eb664151158 (diff)
downloadroads-0724796e51ed655b37c4a80f60c66087c7d16efc.tar
roads-0724796e51ed655b37c4a80f60c66087c7d16efc.tar.gz
roads-0724796e51ed655b37c4a80f60c66087c7d16efc.tar.bz2
roads-0724796e51ed655b37c4a80f60c66087c7d16efc.tar.xz
roads-0724796e51ed655b37c4a80f60c66087c7d16efc.zip
Make sure the message is a string before trying to lowercase it
-rw-r--r--infrastructure/advanced_lane_control_lights.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/infrastructure/advanced_lane_control_lights.lua b/infrastructure/advanced_lane_control_lights.lua
index 195f809..94d7ce1 100644
--- a/infrastructure/advanced_lane_control_lights.lua
+++ b/infrastructure/advanced_lane_control_lights.lua
@@ -63,10 +63,10 @@ for i = 1, 6 do
effector = {
action = function(pos, node, channel, msg)
local setchan = minetest.get_meta(pos):get_string("channel")
- if setchan ~= channel then
+ if setchan ~= channel or type(msg) ~= "string" then
return
end
- msg = msg:lower()
+ msg = string.lower(msg)
if (msg=="off") then
node.name = "infrastructure:lane_control_lights_1"
elseif (msg=="green") then