Skip to content

Commit 2a332eb

Browse files
committed
Correct logic errors
1 parent 3911fca commit 2a332eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/stockpiles/StockpileSerializer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ static void unserialize_list_organic_mat(color_ostream& out, const char* subcat,
499499
}
500500

501501
static bool serialize_list_color(color_ostream& out, FuncWriteExport add_value, const vector<char>* colors) {
502-
bool all = true;
502+
bool all = world->raws.descriptors.colors.size() == colors->size();
503503
if (!colors) {
504504
DEBUG(log, out).print("serialize_list_color: list null\n");
505505
return all;
@@ -1508,14 +1508,14 @@ static bool finished_goods_mat_is_allowed(const MaterialInfo& mi) {
15081508
}
15091509

15101510
bool StockpileSettingsSerializer::write_finished_goods(color_ostream& out, StockpileSettings::FinishedGoodsSet* finished_goods) {
1511-
bool all = mSettings->leather.dyed && mSettings->leather.undyed;
1511+
bool all = mSettings->finished_goods.dyed && mSettings->finished_goods.undyed;
15121512
finished_goods->set_dyed(mSettings->finished_goods.dyed);
15131513
finished_goods->set_undyed(mSettings->finished_goods.undyed);
15141514

15151515
all = serialize_list_item_type(out,
15161516
finished_goods_type_is_allowed,
15171517
[&](const string& token) { finished_goods->add_type(token); },
1518-
mSettings->finished_goods.type);
1518+
mSettings->finished_goods.type) && all;
15191519

15201520
all = serialize_list_material(out,
15211521
finished_goods_mat_is_allowed,

0 commit comments

Comments
 (0)