]> git.tdb.fi Git - r2c2.git/commitdiff
Ignore path change events on currently occupied blocks
authorMikko Rasa <tdb@tdb.fi>
Tue, 23 Jul 2013 13:42:34 +0000 (16:42 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 23 Jul 2013 13:42:34 +0000 (16:42 +0300)
source/libr2c2/blockallocator.cpp

index 3b70f5a0ef6c2647c2e6ee44758e6af591802a67..347960ee2ec584029a7bc66dffaaabb56de0cdad 100644 (file)
@@ -422,7 +422,7 @@ void BlockAllocator::reverse()
 
 void BlockAllocator::turnout_path_changing(Track &track)
 {
-       BlockList::iterator i = find_if(blocks.begin(), blocks.end(), BlockMatch(track.get_block()));
+       BlockList::iterator i = find_if(cur_blocks_end, blocks.end(), BlockMatch(track.get_block()));
        if(i!=blocks.end())
        {
                ++i;