From 370763e4fb294d92554824096909dfe23120121d Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Thu, 26 Oct 2017 21:30:12 +1100 Subject: [PATCH] Fixup ff5d68f (fixes #2125) Also contains a minor fixup of db8891fa3c03 (sign type mismatch warning fix). For some reason, the use of the side-1 fallback in the to_unsigned() calls was making every side get assigned the color red... Sadly, this means an saved games created in the past 12 hours or so have broken color data. Oh well. --- src/team.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/team.cpp b/src/team.cpp index 366f23179a78e..e262bfc45e693 100644 --- a/src/team.cpp +++ b/src/team.cpp @@ -874,7 +874,7 @@ void team::shroud_map::read(const std::string& str) void team::shroud_map::merge(const std::string& str) { int x = 0, y = 0; - for(int i = 1; i < str.length(); ++i) { + for(size_t i = 1; i < str.length(); ++i) { if(str[i] == '|') { y = 0; x++; @@ -971,11 +971,11 @@ std::string team::get_side_color_id_from_config(const config& cfg) // If outside a game context (ie, where a list of teams has been constructed), // this will just be the side's default color. if(c.blank() || c.empty()) { - return get_side_color_id(cfg["side"].to_unsigned(1)); + return get_side_color_id(cfg["side"].to_unsigned()); } // Do the same as above for numeric color key values. - if(unsigned side = c.to_unsigned(1)) { + if(unsigned side = c.to_unsigned()) { return get_side_color_id(side); }