From b5e23ed067e75f17419dc04be872d2162eac01e9 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 23 Jul 2013 16:42:34 +0300 Subject: [PATCH] Ignore path change events on currently occupied blocks --- source/libr2c2/blockallocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libr2c2/blockallocator.cpp b/source/libr2c2/blockallocator.cpp index 3b70f5a..347960e 100644 --- a/source/libr2c2/blockallocator.cpp +++ b/source/libr2c2/blockallocator.cpp @@ -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; -- 2.43.0