aboutsummaryrefslogtreecommitdiff
path: root/advtrains/occupation.lua
diff options
context:
space:
mode:
authororwell <orwell@bleipb.de>2025-01-09 00:57:32 +0100
committerorwell <orwell@bleipb.de>2025-01-09 08:38:09 +0100
commit8c91ce1ec178d6d49f3ddefc57d99eecd0caef3c (patch)
treec5915919c6efe856207d136404846f6ed86670ae /advtrains/occupation.lua
parent9bd34f738663cdc268db6399ecb6aaba2d4c9a28 (diff)
downloadadvtrains-8c91ce1ec178d6d49f3ddefc57d99eecd0caef3c.tar.gz
advtrains-8c91ce1ec178d6d49f3ddefc57d99eecd0caef3c.tar.bz2
advtrains-8c91ce1ec178d6d49f3ddefc57d99eecd0caef3c.zip
Various bugfixes found in lunixforks debug
Diffstat (limited to 'advtrains/occupation.lua')
-rw-r--r--advtrains/occupation.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/advtrains/occupation.lua b/advtrains/occupation.lua
index 26e1f79..20a986e 100644
--- a/advtrains/occupation.lua
+++ b/advtrains/occupation.lua
@@ -89,8 +89,8 @@ function o.set_item(train_id, pos, idx)
assert(idx)
local i = 1
while t[i] do
- if t[i]==train_id and t[i+1]==index then
- break
+ if t[i]==train_id and t[i+1]==idx then
+ return
end
i = i + 2
end