Aric Stewart : hidclass.sys: Make sure we pass in the index not a pointer to the index.
Module: wine Branch: master Commit: 76d8b4ca02ff39e766b6a87abbaaa1e17f0aa63d URL: http://source.winehq.org/git/wine.git/?a=commit;h=76d8b4ca02ff39e766b6a87abb... Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Oct 6 16:22:23 2015 -0500 hidclass.sys: Make sure we pass in the index not a pointer to the index. Signed-off-by: Aric Stewart <aric(a)codeweavers.com> --- dlls/hidclass.sys/device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c index 46bd010..b0982f0 100644 --- a/dlls/hidclass.sys/device.c +++ b/dlls/hidclass.sys/device.c @@ -233,13 +233,15 @@ static NTSTATUS handle_IOCTL_HID_GET_COLLECTION_DESCRIPTOR(IRP *irp, BASE_DEVICE return STATUS_SUCCESS; } -static NTSTATUS handle_minidriver_string(DEVICE_OBJECT *device, IRP *irp, DWORD index) +static NTSTATUS handle_minidriver_string(DEVICE_OBJECT *device, IRP *irp, SHORT index) { IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp ); WCHAR buffer[127]; NTSTATUS status; + ULONG InputBuffer; - status = call_minidriver(IOCTL_HID_GET_STRING, device, &index, sizeof(index), buffer, sizeof(buffer)); + InputBuffer = MAKELONG(index, 0); + status = call_minidriver(IOCTL_HID_GET_STRING, device, ULongToPtr(InputBuffer), sizeof(InputBuffer), buffer, sizeof(buffer)); if (status == STATUS_SUCCESS) {
participants (1)
-
Alexandre Julliard