hidclass.sys: Make sure we pass in the index not a pointer to the index.

Signed-off-by: Aric Stewart <aric@codeweavers.com>
This commit is contained in:
Aric Stewart 2015-10-06 16:22:23 -05:00 committed by Alexandre Julliard
parent 2183b8ac21
commit 76d8b4ca02
1 changed files with 4 additions and 2 deletions

View File

@ -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)
{