diff --git a/scada-common/comms.lua b/scada-common/comms.lua index 1e3373f..07abdb8 100644 --- a/scada-common/comms.lua +++ b/scada-common/comms.lua @@ -311,7 +311,7 @@ function comms.authd_packet() self.valid = false self.raw = self.modem_msg_in.msg - if (type(max_distance) == "number") and (type(distance) == "number") and (distance > max_distance) then + if (type(max_distance) == "number") and ((type(distance) ~= "number") or (distance > max_distance)) then -- outside of maximum allowable transmission distance -- log.debug("comms.authd_packet.receive(): discarding packet with distance " .. distance .. " (outside trusted range)") else diff --git a/scada-common/util.lua b/scada-common/util.lua index 11dc2a8..eb3fdab 100644 --- a/scada-common/util.lua +++ b/scada-common/util.lua @@ -18,7 +18,7 @@ local type = type local util = {} -- scada-common version -util.version = "1.1.4" +util.version = "1.1.5" util.TICK_TIME_S = 0.05 util.TICK_TIME_MS = 50