From 4b94df6a6aab30336ac6a67a073a46b3043bd4b7 Mon Sep 17 00:00:00 2001 From: Ihor Dutchak Date: Sat, 19 Jun 2021 06:12:09 +0300 Subject: [PATCH] win: hid_get_feature_report: Correct number of bytes_returned This originally tested/confirmed by @mcuee. Confirmed the expected behavior by Tim Roberts https://sourceforge.net/p/libusb/mailman/message/37303650/. --- windows/hid.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/windows/hid.c b/windows/hid.c index 081ff9fc5..61fa7e23c 100644 --- a/windows/hid.c +++ b/windows/hid.c @@ -881,11 +881,6 @@ int HID_API_EXPORT HID_API_CALL hid_get_feature_report(hid_device *dev, unsigned return -1; } - /* bytes_returned does not include the first byte which contains the - report ID. The data buffer actually contains one more byte than - bytes_returned. */ - bytes_returned++; - return bytes_returned; #endif }