Skip to content

Commit

Permalink
win: hid_get_input_report: Correct number of bytes_returned (#232)
Browse files Browse the repository at this point in the history
Fixes: #229

This originally tested/confirmed by @JoergAtGithub and @mcuee.
And confirmed the expected behavior by Tim Roberts https://sourceforge.net/p/libusb/mailman/message/37303650/.
  • Loading branch information
JoergAtGithub authored Jun 19, 2021
1 parent 42fa21f commit e74189d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions windows/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,11 +930,6 @@ int HID_API_EXPORT HID_API_CALL hid_get_input_report(hid_device *dev, unsigned c
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
}
Expand Down

0 comments on commit e74189d

Please sign in to comment.