Skip to content

Fix small (1-3 byte) user data packets being ignored - #130

Merged
cnlohr merged 1 commit into
cnlohr:masterfrom
hafriedlander:master
May 12, 2026
Merged

cnlohr merged 1 commit into
cnlohr:masterfrom
hafriedlander:master

Conversation

@hafriedlander

Copy link
Copy Markdown
Contributor

length is already reduced by 3 at

length -= 3;

The result is that small user data packets (1-3 bytes) are dropped. This shows up when (for example) a feature has a 9 total byte length (HID_REPORT_COUNT(8) + 1 byte for HID_REPORT_ID) - the first 8 byte packet is passed to usb_handle_user_data but the second 1 byte packet is dropped.

@cnlohr

cnlohr commented May 11, 2026

Copy link
Copy Markdown
Owner

This looks good to me. @monte-monte what do you think? Also this is great. Should reduce code size.

@monte-monte

Copy link
Copy Markdown
Contributor

I think it's ok.

@cnlohr
cnlohr merged commit 6dc0183 into cnlohr:master May 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants