mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Use sizeof(tx_buf_len) instead of length.
* Length should always be 4 but it's safer this way.
This commit is contained in:
parent
c12473d8b7
commit
fe506fa0fb
@ -77,7 +77,7 @@ void usbdbg_data_in(void *buffer, int length)
|
||||
|
||||
case USBDBG_TX_BUF_LEN: {
|
||||
uint32_t tx_buf_len = usbd_cdc_tx_buf_len();
|
||||
memcpy(buffer, &tx_buf_len, length);
|
||||
memcpy(buffer, &tx_buf_len, sizeof(tx_buf_len));
|
||||
cmd = USBDBG_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user