From 5338eb7f88d2cc702237158bf160955c3a5d54df Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 20 Nov 2013 21:52:32 +0200 Subject: [PATCH] Avoid inserting turnout address zero into routes --- source/libr2c2/route.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/libr2c2/route.cpp b/source/libr2c2/route.cpp index b3dc474..a2e7ac8 100644 --- a/source/libr2c2/route.cpp +++ b/source/libr2c2/route.cpp @@ -173,6 +173,9 @@ void Route::update_turnouts() void Route::update_turnout(Track &track) { + if(!track.get_type().is_turnout()) + return; + // Build a combined path mask from linked endpoints unsigned nls = track.get_n_link_slots(); unsigned mask = track.get_type().get_paths(); -- 2.43.0