mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-02 16:49:05 +00:00
Allow lower case theme colors
This commit is contained in:
@@ -121,7 +121,7 @@ std::vector<std::string> Theme::ThemeNames() {
|
||||
uint32_t Theme::GetThemeColor(const std::string &ThemeName, const std::string &Key, const uint32_t DefaultColor) {
|
||||
if(this->json.contains(ThemeName) && this->json[ThemeName].is_object() && this->json[ThemeName].contains(Key) && this->json[ThemeName][Key].is_string()) {
|
||||
const std::string &colorString = this->json[ThemeName][Key].get_ref<const std::string &>();
|
||||
if (colorString.length() < 7 || std::regex_search(colorString.substr(1), std::regex("[^0-9A-F]"))) { // invalid color.
|
||||
if (colorString.length() < 7 || std::regex_search(colorString.substr(1), std::regex("[^0-9A-Fa-f]"))) { // invalid color.
|
||||
return DefaultColor;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user