Sebastian Lackner : hidclass.sys: Update reportBuffer pointer after reading packet from ringbuffer.

Alexandre Julliard julliard at winehq.org
Thu Oct 27 14:27:56 CDT 2016


Module: wine
Branch: master
Commit: 9581f4c15a84d6b425e0689f8cdc20c6d90627d3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9581f4c15a84d6b425e0689f8cdc20c6d90627d3

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Wed Oct 26 21:52:58 2016 +0200

hidclass.sys: Update reportBuffer pointer after reading packet from ringbuffer.

Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/hidclass.sys/device.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c
index bc871b9..6d9b0d4 100644
--- a/dlls/hidclass.sys/device.c
+++ b/dlls/hidclass.sys/device.c
@@ -218,6 +218,7 @@ static void HID_Device_processQueue(DEVICE_OBJECT *device)
         if (buffer_size)
         {
             IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation(irp);
+            packet->reportBuffer = (BYTE *)packet + sizeof(*packet);
             TRACE_(hid_report)("Processing Request (%i)\n",ptr);
             if (irpsp->Parameters.Read.Length >= packet->reportBufferLen)
             {
@@ -645,6 +646,7 @@ NTSTATUS WINAPI HID_Device_read(DEVICE_OBJECT *device, IRP *irp)
     if (buffer_size)
     {
         IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp );
+        packet->reportBuffer = (BYTE *)packet + sizeof(*packet);
         TRACE_(hid_report)("Got Packet %p %i\n", packet->reportBuffer, packet->reportBufferLen);
         if (irpsp->Parameters.Read.Length >= packet->reportBufferLen)
         {




More information about the wine-cvs mailing list