From ee88cfa1506dc24c16b9884d0f39f9425d30fd25 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 1 Nov 2024 13:40:29 +0000 Subject: [PATCH] Fix selection of encoding from maps Fixes typo from previous PR --- lib/modding/CModHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modding/CModHandler.cpp b/lib/modding/CModHandler.cpp index f1534bc62..4bf11bbc5 100644 --- a/lib/modding/CModHandler.cpp +++ b/lib/modding/CModHandler.cpp @@ -443,7 +443,7 @@ std::string CModHandler::findResourceEncoding(const ResourcePath & resource) con // however at the moment we have no way to detect that for sure - file can be either in English or in user-preferred language // but since all known H3 encodings (Win125X or GBK) are supersets of ASCII, we can safely load English data using encoding of user-preferred language std::string preferredLanguage = VLC->generaltexth->getPreferredLanguage(); - std::string fileEncoding = Languages::getLanguageOptions(modLanguage).encoding; + std::string fileEncoding = Languages::getLanguageOptions(preferredLanguage).encoding; return fileEncoding; } else