diff --git a/hardware/arduino/avr/cores/arduino/Print.cpp b/hardware/arduino/avr/cores/arduino/Print.cpp index 5df56306e..782d50b4e 100644 --- a/hardware/arduino/avr/cores/arduino/Print.cpp +++ b/hardware/arduino/avr/cores/arduino/Print.cpp @@ -122,9 +122,7 @@ size_t Print::print(const Printable& x) size_t Print::println(void) { - size_t n = print('\r'); - n += print('\n'); - return n; + return write("\r\n"); } size_t Print::println(const String &s) diff --git a/hardware/arduino/sam/cores/arduino/Print.cpp b/hardware/arduino/sam/cores/arduino/Print.cpp index 23f6a2372..379631955 100644 --- a/hardware/arduino/sam/cores/arduino/Print.cpp +++ b/hardware/arduino/sam/cores/arduino/Print.cpp @@ -115,9 +115,7 @@ size_t Print::print(const Printable& x) size_t Print::println(void) { - size_t n = print('\r'); - n += print('\n'); - return n; + return write("\r\n"); } size_t Print::println(const String &s)