Commit 16bc6b05 authored by Ivo Ivanov's avatar Ivo Ivanov Committed by Alexandre Julliard

dinput: Pass buffer byte length to HidD_GetProductString.

Instead of then number of WCHAR. Signed-off-by: 's avatarIvo Ivanov <logos128@gmail.com> Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 6501968d
......@@ -1239,8 +1239,8 @@ static BOOL hid_joystick_device_try_open( UINT32 handle, const WCHAR *path, HAND
if (caps->UsagePage != HID_USAGE_PAGE_GENERIC) goto failed;
if (caps->Usage != HID_USAGE_GENERIC_GAMEPAD && caps->Usage != HID_USAGE_GENERIC_JOYSTICK) goto failed;
if (!HidD_GetProductString( device_file, instance->tszInstanceName, MAX_PATH )) goto failed;
if (!HidD_GetProductString( device_file, instance->tszProductName, MAX_PATH )) goto failed;
if (!HidD_GetProductString( device_file, instance->tszInstanceName, MAX_PATH * sizeof(WCHAR) )) goto failed;
if (!HidD_GetProductString( device_file, instance->tszProductName, MAX_PATH * sizeof(WCHAR) )) goto failed;
instance->guidInstance = hid_joystick_guid;
instance->guidInstance.Data1 ^= handle;
......
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