diff options
| author | hathach <[email protected]> | 2019-09-01 17:20:10 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-09-01 17:20:10 +0700 |
| commit | 80cde5b0b5008200d6020d9a55b74260245a4e3b (patch) | |
| tree | c0e9377e5eb43f9a2023798029c01dd4700b09af /src/class | |
| parent | 074681da8bab89e108f43988b347683812b0be9a (diff) | |
fix potential bug with mis-align issue
Diffstat (limited to 'src/class')
| -rw-r--r-- | src/class/hid/hid_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c index 949fd183d..572f2cad2 100644 --- a/src/class/hid/hid_device.c +++ b/src/class/hid/hid_device.c @@ -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);
|
