win32u: Fix device instance value size in link_device.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-12-07 15:28:37 +01:00 committed by Alexandre Julliard
parent 66d2321a39
commit ef30380d4a

View file

@ -798,7 +798,7 @@ static void link_device( const WCHAR *instance, const WCHAR *class )
len += class_len;
hkey = reg_create_key( control_key, buffer, len * sizeof(WCHAR), 0, NULL );
set_reg_value( hkey, device_instanceW, REG_SZ, instance, instance_len * sizeof(WCHAR) );
set_reg_value( hkey, device_instanceW, REG_SZ, instance, (instance_len + 1) * sizeof(WCHAR) );
subkey = reg_create_key( hkey, hashW, sizeof(hashW), REG_OPTION_VOLATILE, NULL );
NtClose( hkey );