diff options
author | cheapie <no-email-for-you@example.com> | 2024-07-19 17:30:03 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2024-07-19 17:30:03 -0500 |
commit | 7e8bdac31ee1f859db4156803c95fd248ed4cc5c (patch) | |
tree | 031d673197c15a3590dcc42afb70aebbc63b4964 | |
parent | bf31b4384e9eb52288dc4c3d60d075843ecd6422 (diff) | |
download | celevator-7e8bdac31ee1f859db4156803c95fd248ed4cc5c.tar celevator-7e8bdac31ee1f859db4156803c95fd248ed4cc5c.tar.gz celevator-7e8bdac31ee1f859db4156803c95fd248ed4cc5c.tar.bz2 celevator-7e8bdac31ee1f859db4156803c95fd248ed4cc5c.tar.xz celevator-7e8bdac31ee1f859db4156803c95fd248ed4cc5c.zip |
Fix crash if a dispatcher receives a status message for an unknown car
-rw-r--r-- | dispatcherfw.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/dispatcherfw.lua b/dispatcherfw.lua index 6489944..741175c 100644 --- a/dispatcherfw.lua +++ b/dispatcherfw.lua @@ -13,6 +13,7 @@ if not mem.powerstate then mem.powerstate = "awake" end if not mem.dbdcalls then mem.dbdcalls = {} end local function getpos(carid) + if not mem.params.floorsserved[carid] then return 0 end local floormap = {} local floorheights = {} for i=1,#mem.params.floornames,1 do |