mirror of
https://github.com/hathach/tinyusb.git
synced 2025-05-08 23:01:36 +08:00
Merge pull request #3020 from Cynventria/fix-desc_end-calculation-in-vendor-device-open
fix desc_end in vendord_open()
This commit is contained in:
commit
f01c4be350
2
src/class/vendor/vendor_device.c
vendored
2
src/class/vendor/vendor_device.c
vendored
@ -197,7 +197,7 @@ void vendord_reset(uint8_t rhport) {
|
||||
uint16_t vendord_open(uint8_t rhport, const tusb_desc_interface_t* desc_itf, uint16_t max_len) {
|
||||
TU_VERIFY(TUSB_CLASS_VENDOR_SPECIFIC == desc_itf->bInterfaceClass, 0);
|
||||
const uint8_t* p_desc = tu_desc_next(desc_itf);
|
||||
const uint8_t* desc_end = p_desc + max_len;
|
||||
const uint8_t* desc_end = (uint8_t const*)desc_itf + max_len;
|
||||
|
||||
// Find available interface
|
||||
vendord_interface_t* p_vendor = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user