]> git.tdb.fi Git - r2c2.git/commitdiff
Avoid inserting turnout address zero into routes
authorMikko Rasa <tdb@tdb.fi>
Wed, 20 Nov 2013 19:52:32 +0000 (21:52 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 20 Nov 2013 19:52:32 +0000 (21:52 +0200)
source/libr2c2/route.cpp

index b3dc474d81d4cbdfeb68bf13d162646cd4262691..a2e7ac8c4c2c5d00a18597185377e12e70a89861 100644 (file)
@@ -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();