stockpiles: properly initialize quality arrays

Props to @fricy for identifying this bug.
develop
Casey Link 2014-12-05 17:39:29 +01:00
parent b0e0bbda9b
commit b9a2ecb440
1 changed files with 1 additions and 4 deletions

@ -342,6 +342,7 @@ void StockpileSerializer::quality_clear ( bool ( &pile_list ) [7] )
void StockpileSerializer::unserialize_list_quality ( FuncReadImport read_value, int32_t list_size, bool ( &pile_list ) [7] ) void StockpileSerializer::unserialize_list_quality ( FuncReadImport read_value, int32_t list_size, bool ( &pile_list ) [7] )
{ {
quality_clear ( pile_list );
if ( list_size > 0 && list_size <= 7 ) if ( list_size > 0 && list_size <= 7 )
{ {
using df::enums::item_quality::item_quality; using df::enums::item_quality::item_quality;
@ -359,10 +360,6 @@ void StockpileSerializer::unserialize_list_quality ( FuncReadImport read_value,
pile_list[idx] = true; pile_list[idx] = true;
} }
} }
else
{
quality_clear ( pile_list );
}
} }