https://git.reactos.org/?p=reactos.git;a=commitdiff;h=86572f1f699913731becb…
commit 86572f1f699913731becb500782802f6f30cc7b9
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sun May 3 20:33:23 2020 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun May 3 20:33:23 2020 +0200
[RAPPS] Fix the locale fix
---
base/applications/rapps/misc.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/base/applications/rapps/misc.cpp b/base/applications/rapps/misc.cpp
index 2854c9432eb..f76c3849b50 100644
--- a/base/applications/rapps/misc.cpp
+++ b/base/applications/rapps/misc.cpp
@@ -336,7 +336,10 @@ VOID CConfigParser::CacheINILocale()
m_szCachedINISectionLocale = L"Section." + m_szLocaleID;
// turn "Section.0c0a" into "Section.0a", keeping just the
neutral lang part
- m_szCachedINISectionLocaleNeutral =
m_szCachedINISectionLocale.Left(m_szCachedINISectionLocale.GetLength() - 2);
+ if (m_szLocaleID.GetLength() >= 2)
+ m_szCachedINISectionLocaleNeutral = L"Section." +
m_szLocaleID.Right(2);
+ else
+ m_szCachedINISectionLocaleNeutral = m_szCachedINISectionLocale;
}
BOOL CConfigParser::GetString(const ATL::CStringW& KeyName, ATL::CStringW&
ResultString)