This fixes a problem where a train would wait for a turnout to be freed,
then reserve it and immediately advance to it, triggering a false arrival
in the router.
+ if(end==blocks.end() && blocks.back().block()==pending_block)
+ --end;
+
SetFlag setf(advancing);
BlockList::iterator i = cur_blocks_end;
// Update cur_blocks_end first to keep things consistent.
SetFlag setf(advancing);
BlockList::iterator i = cur_blocks_end;
// Update cur_blocks_end first to keep things consistent.