1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

win32u: Fix incorrect ascii key name in get_config_key.

Fixes 6b8b35f950 which incorrectly
replaced it with string literal, leading to the default setting being
used all the time.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56435
This commit is contained in:
Rémi Bernon 2024-03-14 15:19:45 +01:00 committed by Alexandre Julliard
parent 898892d5f0
commit 3944b36b98

View file

@ -4665,13 +4665,10 @@ static union sysparam_all_entry * const default_entries[] =
static DWORD get_config_key( HKEY defkey, HKEY appkey, const char *name,
WCHAR *buffer, DWORD size )
{
WCHAR nameW[128];
char buf[2048];
KEY_VALUE_PARTIAL_INFORMATION *info = (void *)buf;
asciiz_to_unicode( nameW, name );
if (appkey && query_reg_ascii_value( appkey, "Name", info, sizeof(buf) ))
if (appkey && query_reg_ascii_value( appkey, name, info, sizeof(buf) ))
{
size = min( info->DataLength, size - sizeof(WCHAR) );
memcpy( buffer, info->Data, size );
@ -4679,7 +4676,7 @@ static DWORD get_config_key( HKEY defkey, HKEY appkey, const char *name,
return 0;
}
if (defkey && query_reg_ascii_value( defkey, "Name", info, sizeof(buf) ))
if (defkey && query_reg_ascii_value( defkey, name, info, sizeof(buf) ))
{
size = min( info->DataLength, size - sizeof(WCHAR) );
memcpy( buffer, info->Data, size );