From: Mikko Rasa Date: Wed, 20 Nov 2013 19:52:32 +0000 (+0200) Subject: Avoid inserting turnout address zero into routes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=5338eb7f88d2cc702237158bf160955c3a5d54df;p=r2c2.git Avoid inserting turnout address zero into routes --- 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();