From 067be891d7d9db7206f2a49d1883e684df915db3 Mon Sep 17 00:00:00 2001 From: Pk11 Date: Wed, 24 Mar 2021 00:01:40 -0500 Subject: [PATCH] Allow lower case theme colors --- source/utils/theme.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utils/theme.cpp b/source/utils/theme.cpp index 12bbbfb..24b9644 100644 --- a/source/utils/theme.cpp +++ b/source/utils/theme.cpp @@ -121,7 +121,7 @@ std::vector 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(); - 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; }