Also contains a minor fixup of db8891fa3c
(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.
This commit is contained in:
parent
db8891fa3c
commit
dbf2847a44
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue