aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell <orwell@bleipb.de>2025-01-07 21:57:17 +0100
committerorwell <orwell@bleipb.de>2025-01-07 21:57:17 +0100
commit5c10aa2bc051d56b0eda33d1c3e449cfbf896e80 (patch)
tree4f4ab84a8cbee61afb283dbdd1adb4bae9674955
parent38acdbbe1d3a9f2c91ced0281cd58b6c29cff401 (diff)
downloadadvtrains-5c10aa2bc051d56b0eda33d1c3e449cfbf896e80.tar.gz
advtrains-5c10aa2bc051d56b0eda33d1c3e449cfbf896e80.tar.bz2
advtrains-5c10aa2bc051d56b0eda33d1c3e449cfbf896e80.zip
Bugfix for accidentally splitting sections on train placement
-rw-r--r--advtrains_interlocking/database.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/advtrains_interlocking/database.lua b/advtrains_interlocking/database.lua
index 077e58a..2152196 100644
--- a/advtrains_interlocking/database.lua
+++ b/advtrains_interlocking/database.lua
@@ -357,8 +357,8 @@ function ildb.check_and_repair_ts_at_pos(pos, tcb_connid, notify_pname, force_cr
if ildb.get_tcb(pos) then
if not tcb_connid then error("check_and_repair_ts_at_pos: Startpoint is TCB, must provide tcb_connid!") end
else
- --if tcb_connid then error("check_and_repair_ts_at_pos: Startpoint is not TCB, must not provide tcb_connid!") end
- -- do not give error here, for some applications do not require it
+ -- FIX 2025-01-07: If the checked pos is not a TCB, we always need to search in both directions, otherwise we errorneously split a ts
+ tcb_connid = nil
end
-- STEP 1: Ensure that only one section is at this place
-- get all TCBs adjacent to this