Rémi Bernon : win32u: Fix incorrect ascii key name in get_config_key.
Module: wine Branch: master Commit: 3944b36b9853598fe3ae83b63fc26c5c1c4eb8ca URL: https://gitlab.winehq.org/wine/wine/-/commit/3944b36b9853598fe3ae83b63fc26c5... Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 14 15:19:45 2024 +0100 win32u: Fix incorrect ascii key name in get_config_key. Fixes 6b8b35f9507f61e435d0b4582e31584c9244fa70 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 --- dlls/win32u/sysparams.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index efcf8f64841..7cefb3822a3 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -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 );
participants (1)
-
Alexandre Julliard