When the report id is zero, we should indeed skip the first byte of
transfer_priv->hid_buffer, since it is not part of the actual report.
But the report size should not change.
Thanks to Jonas Malaco who has done the investigation in this issue.
Reference: Jonas Malaco's comments
https://github.com/libusb/libusb/issues/902#issuecomment-
810726897
Fixes #902
Fixes #977
Closes #986
}
if (transfer_priv->hid_buffer[0] == 0) {
- // Discard the 1 byte report ID prefix
- length--;
memcpy(transfer_priv->hid_dest, transfer_priv->hid_buffer + 1, length);
} else {
memcpy(transfer_priv->hid_dest, transfer_priv->hid_buffer, length);
-#define LIBUSB_NANO 11650
+#define LIBUSB_NANO 11651