mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[SYSSETUP] WriteUserLocale(): Fix Locale[] length and value (#8090)
'Locale' format is "0000nnnn". CORE-15848
This commit is contained in:
@@ -1455,11 +1455,11 @@ WriteUserLocale(VOID)
|
||||
{
|
||||
HKEY hKey;
|
||||
LCID lcid;
|
||||
WCHAR Locale[12];
|
||||
WCHAR Locale[9] = L"0000";
|
||||
|
||||
lcid = GetSystemDefaultLCID();
|
||||
|
||||
if (GetLocaleInfoW(MAKELCID(lcid, SORT_DEFAULT), LOCALE_ILANGUAGE, Locale, ARRAYSIZE(Locale)) != 0)
|
||||
if (GetLocaleInfoW(MAKELCID(lcid, SORT_DEFAULT), LOCALE_ILANGUAGE, &Locale[4], _countof(Locale) - 4) != 0)
|
||||
{
|
||||
if (RegCreateKeyExW(HKEY_CURRENT_USER, L"Control Panel\\International",
|
||||
0, NULL, REG_OPTION_NON_VOLATILE,
|
||||
|
||||
Reference in New Issue
Block a user