Commit da5112c7 authored by Matej Špindler's avatar Matej Špindler Committed by Alexandre Julliard

kernel32: Check for LOCALE_NOUSEROVERRIDE for neutral locales.

parent cd5570d9
...@@ -1812,7 +1812,7 @@ INT WINAPI GetLocaleInfoEx(LPCWSTR locale, LCTYPE info, LPWSTR buffer, INT len) ...@@ -1812,7 +1812,7 @@ INT WINAPI GetLocaleInfoEx(LPCWSTR locale, LCTYPE info, LPWSTR buffer, INT len)
/* special handling for neutral locale names */ /* special handling for neutral locale names */
if (locale && strlenW(locale) == 2) if (locale && strlenW(locale) == 2)
{ {
switch (info) switch (info & ~LOCALE_LOCALEINFOFLAGSMASK)
{ {
case LOCALE_SNAME: case LOCALE_SNAME:
if (len && len < 3) if (len && len < 3)
......
...@@ -4499,6 +4499,10 @@ static void test_GetLocaleInfoEx(void) ...@@ -4499,6 +4499,10 @@ static void test_GetLocaleInfoEx(void)
ok(ret == 1, "got %d\n", ret); ok(ret == 1, "got %d\n", ret);
ok(!bufferW[0], "got %s\n", wine_dbgstr_w(bufferW)); ok(!bufferW[0], "got %s\n", wine_dbgstr_w(bufferW));
ret = pGetLocaleInfoEx(enW, LOCALE_SPARENT | LOCALE_NOUSEROVERRIDE, bufferW, sizeof(bufferW)/sizeof(WCHAR));
ok(ret == 1, "got %d\n", ret);
ok(!bufferW[0], "got %s\n", wine_dbgstr_w(bufferW));
ret = pGetLocaleInfoEx(enW, LOCALE_SCOUNTRY, bufferW, sizeof(bufferW)/sizeof(WCHAR)); ret = pGetLocaleInfoEx(enW, LOCALE_SCOUNTRY, bufferW, sizeof(bufferW)/sizeof(WCHAR));
ok(ret == lstrlenW(bufferW)+1, "got %d\n", ret); ok(ret == lstrlenW(bufferW)+1, "got %d\n", ret);
if ((PRIMARYLANGID(LANGIDFROMLCID(GetSystemDefaultLCID())) != LANG_ENGLISH) || if ((PRIMARYLANGID(LANGIDFROMLCID(GetSystemDefaultLCID())) != LANG_ENGLISH) ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment