Game Config: Game Config: fixup tc_info not parsing the color range correctly
This commit is contained in:
parent
d22711af3d
commit
504487b340
1 changed files with 8 additions and 6 deletions
|
@ -496,12 +496,14 @@ const std::vector<color_t>& tc_info(const std::string& name)
|
|||
}
|
||||
|
||||
std::vector<color_t> temp;
|
||||
try {
|
||||
temp.push_back(color_t::from_hex_string(name));
|
||||
} catch(std::invalid_argument&) {
|
||||
static std::vector<color_t> stv;
|
||||
ERR_NG << "Invalid color palette: " << name << std::endl;
|
||||
return stv;
|
||||
for(const auto& s : utils::split(name)) {
|
||||
try {
|
||||
temp.push_back(color_t::from_hex_string(s));
|
||||
} catch(std::invalid_argument&) {
|
||||
static std::vector<color_t> stv;
|
||||
ERR_NG << "Invalid color in palette: " << s << std::endl;
|
||||
return stv;
|
||||
}
|
||||
}
|
||||
|
||||
team_rgb_colors.insert({name, temp});
|
||||
|
|
Loading…
Add table
Reference in a new issue