mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
fix potential bug with mis-align issue
This commit is contained in:
parent
074681da8b
commit
80cde5b0b5
@ -178,7 +178,7 @@ bool hidd_open(uint8_t rhport, tusb_desc_interface_t const * desc_itf, uint16_t
|
||||
|
||||
p_hid->boot_mode = false; // default mode is REPORT
|
||||
p_hid->itf_num = desc_itf->bInterfaceNumber;
|
||||
p_hid->reprot_desc_len = desc_hid->wReportLength;
|
||||
memcpy(&p_hid->reprot_desc_len, &desc_hid->wReportLength, 2);
|
||||
|
||||
*p_len = sizeof(tusb_desc_interface_t) + sizeof(tusb_hid_descriptor_hid_t) + desc_itf->bNumEndpoints*sizeof(tusb_desc_endpoint_t);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user