From a59332134622ddfd8e289f47890c71c5182462a8 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sat, 26 Jul 2025 00:00:35 +0200 Subject: [PATCH] Bugfix: setJoin(true) should not change anythiung if there is no PROG track --- TrackManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TrackManager.cpp b/TrackManager.cpp index b043e04..39fbed1 100644 --- a/TrackManager.cpp +++ b/TrackManager.cpp @@ -703,9 +703,11 @@ void TrackManager::setJoin(bool joined) { setTrackMode(t, TRACK_MODE_MAIN, 0, false); // 0 = no DC loco; false = do not turn off pwr // then in some cases setPower() is called // seperately after the setJoin() as well - break; // there is only one prog track, done + goto success; // there is only one prog track, done } } + return; // no prog track found, can not do more + success: /* continue here when prog tack found */; } else { if (tempProgTrack != MAX_TRACKS+1) { // setTrackMode defaults to power off, so we