Skip to content

Commit 96e2fa2

Browse files
committed
misleadedly assumed ::write() could return -1 like arduino's ::read does
1 parent 7ffcd39 commit 96e2fa2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp8266/Print.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ size_t Print::write(const uint8_t *buffer, size_t size) {
4646
size_t n = 0;
4747
while (size--) {
4848
size_t ret = write(*buffer++);
49-
if (ret <= 0) {
49+
if (ret == 0) {
5050
// Write of last byte didn't complete, abort additional processing
5151
break;
5252
}

0 commit comments

Comments
 (0)