From: Mikko Rasa Date: Fri, 20 Feb 2015 09:58:42 +0000 (+0200) Subject: Don't save an allocated but pending block X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=4b9ed4362779040bfde6d5cd400a1fbffc894815;p=r2c2.git Don't save an allocated but pending block It could be a failed turnout which is still set the wrong way. --- diff --git a/source/libr2c2/blockallocator.cpp b/source/libr2c2/blockallocator.cpp index 79274b7..7cca79f 100644 --- a/source/libr2c2/blockallocator.cpp +++ b/source/libr2c2/blockallocator.cpp @@ -587,7 +587,7 @@ void BlockAllocator::save(list &st) const st.push_back((DataFile::Statement("hint"), prev->get_id())); - for(BlockList::const_iterator i=cur_blocks.begin(); i!=cur_blocks.end(); ++i) + for(BlockList::const_iterator i=cur_blocks.begin(); (i!=cur_blocks.end() && i->block()!=pending_block); ++i) st.push_back((DataFile::Statement("block"), (*i)->get_id())); } }