uart-bridge: usb_read_bytes: fix usb_buffer access

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
Álvaro Fernández Rojas 2021-10-25 18:42:30 +02:00
parent 7a8e3bf16c
commit 2460b10523

View file

@ -131,7 +131,7 @@ void usb_read_bytes(uint8_t itf) {
if (len) {
uint32_t count;
count = tud_cdc_n_read(itf, ud->usb_buffer, len);
count = tud_cdc_n_read(itf, &ud->usb_buffer[ud->usb_pos], len);
ud->usb_pos += count;
}