kernelbase: Reimplement LOCALE_SPARENT in GetLocaleInfoW/Ex using the locale.nls data.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2022-03-28 12:13:04 +02:00
parent d370618a5a
commit 0f7cd3d685
1 changed files with 1 additions and 12 deletions

View File

@ -1103,7 +1103,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return -1;
case LOCALE_SPARENT:
return -1;
return locale_return_string( locale->sparent, type, buffer, len );
case LOCALE_SCONSOLEFALLBACKNAME:
return -1;
@ -5017,17 +5017,6 @@ INT WINAPI DECLSPEC_HOTPATCH GetLocaleInfoEx( const WCHAR *name, LCTYPE info, WC
lcid = LocaleNameToLCID( name, 0 );
if (!lcid) return 0;
/* special handling for neutral locale names */
if (name && lstrlenW( name ) == 2)
{
switch (LOWORD( info ))
{
case LOCALE_SPARENT:
if (len) buffer[0] = 0;
return 1;
}
}
return GetLocaleInfoW( lcid, info, buffer, len );
}