Skip to content

Commit 85bc9b0

Browse files
committed
Return the correct bytes written.
1 parent 79b175a commit 85bc9b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: cores/arduino/USBSerial.cpp

+1-1
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)