From a95a58a8a399173e6947ff12a4b82b5d83ae80d9 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Sun, 19 Nov 2023 17:22:43 -0800 Subject: [PATCH] Fix sRGB working profile crash The sRGB working profile cannot be found under some conditions because the profile name is stored as a Glib::ustring and the same strings may not be equal when using different locales. Use std::string whenever comparing profile names. --- rtengine/iccstore.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 8ba5fb4af..af1b94fbe 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -18,6 +18,7 @@ */ #include #include +#include #include #include @@ -51,9 +52,9 @@ namespace // Not recursive void loadProfiles( const Glib::ustring& dirName, - std::map* profiles, - std::map* profileContents, - std::map* profileNames, + std::map* profiles, + std::map* profileContents, + std::map* profileNames, bool nameUpper ) { @@ -114,8 +115,8 @@ void loadProfiles( bool loadProfile( const Glib::ustring& profile, const Glib::ustring& dirName, - std::map* profiles, - std::map* profileContents + std::map* profiles, + std::map* profileContents ) { if (dirName.empty() || profiles == nullptr) { @@ -996,10 +997,10 @@ parse_error: return false; } - using ProfileMap = std::map; - using MatrixMap = std::map; - using ContentMap = std::map; - using NameMap = std::map; + using ProfileMap = std::map; + using MatrixMap = std::map; + using ContentMap = std::map; + using NameMap = std::map; ProfileMap wProfiles; // ProfileMap wProfilesGamma;