Commit 3944b36b authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

win32u: Fix incorrect ascii key name in get_config_key.

Fixes 6b8b35f9 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
parent 898892d5
......@@ -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 );
......
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