Rémi Bernon : dinput: Only dump the HID report data that has been read.
Alexandre Julliard
julliard at winehq.org
Tue Oct 12 16:12:48 CDT 2021
Module: wine
Branch: master
Commit: cb8bc378c2d67989071e34790dde9d7f921ece00
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cb8bc378c2d67989071e34790dde9d7f921ece00
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Tue Oct 12 09:56:22 2021 +0200
dinput: Only dump the HID report data that has been read.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dinput/joystick_hid.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c
index 48594e5d622..203a5d7788d 100644
--- a/dlls/dinput/joystick_hid.c
+++ b/dlls/dinput/joystick_hid.c
@@ -1607,14 +1607,14 @@ static HRESULT hid_joystick_read_state( IDirectInputDevice8W *iface )
if (ret && TRACE_ON(dinput))
{
TRACE( "read size %u report:\n", count );
- for (i = 0; i < report_len;)
+ for (i = 0; i < count;)
{
char buffer[256], *buf = buffer;
buf += sprintf(buf, "%08x ", i);
do
{
buf += sprintf(buf, " %02x", (BYTE)report_buf[i] );
- } while (++i % 16 && i < report_len);
+ } while (++i % 16 && i < count);
TRACE("%s\n", buffer);
}
}
More information about the wine-cvs
mailing list