Skip to content

Commit 60e4d4a

Browse files
committed
Return the correct bytes written
1 parent 4d51503 commit 60e4d4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/USBSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ size_t USBSerial::write(const uint8_t *buffer, size_t size)
8484
// After storing data, start transmitting process
8585
CDC_continue_transmit();
8686
} else if (!CDC_connected()) {
87-
return size;
87+
return size - rest;
8888
}
8989
}
9090
return size;

0 commit comments

Comments
 (0)