aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_interlocking')
-rw-r--r--advtrains_interlocking/lzb.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains_interlocking/lzb.lua b/advtrains_interlocking/lzb.lua
index 8781d40..db745ef 100644
--- a/advtrains_interlocking/lzb.lua
+++ b/advtrains_interlocking/lzb.lua
@@ -138,7 +138,7 @@ local function apply_control(id, train)
local lzb = train.lzb
local i = 1
- while i<#lzb.oncoming do
+ while i<=#lzb.oncoming do
if lzb.oncoming[i].idx < train.index then
train.speed_restriction = lzb.oncoming[i].spd
table.remove(lzb.oncoming, i)