#303 check modem message distance for nil

This commit is contained in:
Mikayla Fischler 2023-08-02 10:13:54 -04:00
parent ba896ea163
commit b2c55f9d4b
3 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -323,7 +323,7 @@ function comms.authd_packet()
self.valid = false
self.raw = self.modem_msg_in.msg
if (type(max_distance) == "number") and (distance > max_distance) then
if (type(max_distance) == "number") and (type(distance) == "number") and (distance > max_distance) then
-- outside of maximum allowable transmission distance
-- log.debug("comms.authd_packet.receive(): discarding packet with distance " .. distance .. " outside of trusted range")
else

View File

@ -8,7 +8,7 @@ local cc_strings = require("cc.strings")
local util = {}
-- scada-common version
util.version = "1.0.0"
util.version = "1.0.1"
-- ENVIRONMENT CONSTANTS --