Skip to content

Commit 126d767

Browse files
committed
Avoid USBCDC send_nb break the continuation use case
1 parent c30af6a commit 126d767

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/source/USBCDC.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ void USBCDC::send_nb(uint8_t *buffer, uint32_t size, uint32_t *actual, bool now)
391391
uint32_t free = sizeof(_tx_buffer) - _tx_size;
392392
uint32_t write_size = free > size ? size : free;
393393
if (size > 0) {
394-
memcpy(_tx_buf, buffer, write_size);
394+
memcpy(_tx_buf + _tx_size, buffer, write_size);
395395
}
396396
_tx_size += write_size;
397397
*actual = write_size;

0 commit comments

Comments
 (0)