mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[WINESYNC] kernel32: Don't return a parent locale for neutral locales in GetLocaleInfoEx.
Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id c63a08586f19af7e6a65a064696743f648006fcd by Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
90c0562935
commit
c08580dee3
1 changed files with 13 additions and 7 deletions
|
@ -1831,16 +1831,22 @@ INT WINAPI GetLocaleInfoEx(LPCWSTR locale, LCTYPE info, LPWSTR buffer, INT len)
|
|||
if (!lcid) return 0;
|
||||
|
||||
/* special handling for neutral locale names */
|
||||
if (info == LOCALE_SNAME && locale && strlenW(locale) == 2)
|
||||
if (locale && strlenW(locale) == 2)
|
||||
{
|
||||
if (len && len < 3)
|
||||
switch (info)
|
||||
{
|
||||
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||
return 0;
|
||||
case LOCALE_SNAME:
|
||||
if (len && len < 3)
|
||||
{
|
||||
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||
return 0;
|
||||
}
|
||||
if (len) strcpyW(buffer, locale);
|
||||
return 3;
|
||||
case LOCALE_SPARENT:
|
||||
if (len) buffer[0] = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (len) strcpyW(buffer, locale);
|
||||
return 3;
|
||||
}
|
||||
|
||||
return GetLocaleInfoW(lcid, info, buffer, len);
|
||||
|
|
Loading…
Reference in a new issue