mirror of
https://github.com/hathach/tinyusb.git
synced 2025-10-29 19:49:07 +00:00
Fix HID descriptor parser size handling
This commit is contained in:
parent
9d872d529f
commit
1a41445b17
@ -662,9 +662,9 @@ uint8_t tuh_hid_parse_report_descriptor(tuh_hid_report_info_t* report_info_arr,
|
||||
|
||||
uint8_t const tag = header.tag;
|
||||
uint8_t const type = header.type;
|
||||
uint8_t const size = header.size;
|
||||
uint8_t const size = (header.size == 3) ? 4 : header.size;
|
||||
|
||||
uint8_t const data8 = desc_report[0];
|
||||
uint8_t const data8 = (size > 0) ? desc_report[0] : 0;
|
||||
|
||||
TU_LOG(3, "tag = %d, type = %d, size = %d, data = ", tag, type, size);
|
||||
for (uint32_t i = 0; i < size; i++) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user