Game Config: fixup color_info not parsing the color range correctly
This commit is contained in:
parent
44f8d2e539
commit
cc5071f2e9
1 changed files with 6 additions and 4 deletions
|
@ -477,10 +477,12 @@ const color_range& color_info(const std::string& name)
|
|||
}
|
||||
|
||||
std::vector<color_t> temp;
|
||||
try {
|
||||
temp.push_back(color_t::from_hex_string(name));
|
||||
} catch(std::invalid_argument& e) {
|
||||
throw config::error(_("Invalid color range: ") + name);
|
||||
for(const auto& s : utils::split(name)) {
|
||||
try {
|
||||
temp.push_back(color_t::from_hex_string(s));
|
||||
} catch(std::invalid_argument& e) {
|
||||
throw config::error(_("Invalid color in range: ") + s);
|
||||
}
|
||||
}
|
||||
|
||||
team_rgb_range.insert({name, color_range(temp)});
|
||||
|
|
Loading…
Add table
Reference in a new issue