From 4b9ed4362779040bfde6d5cd400a1fbffc894815 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 20 Feb 2015 11:58:42 +0200 Subject: [PATCH] Don't save an allocated but pending block It could be a failed turnout which is still set the wrong way. --- 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 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())); } } -- 2.43.0