[PATCH] dinput: Only dump the HID report data that has been read.
Rémi Bernon
rbernon at codeweavers.com
Tue Oct 12 02:56:22 CDT 2021
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
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 ef082ca1282..0661affecbc 100644
--- a/dlls/dinput/joystick_hid.c
+++ b/dlls/dinput/joystick_hid.c
@@ -1629,14 +1629,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);
}
}
--
2.33.0
More information about the wine-devel
mailing list