diff options
Diffstat (limited to 'cores/arduino/Print.cpp')
-rwxr-xr-x | cores/arduino/Print.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cores/arduino/Print.cpp b/cores/arduino/Print.cpp index e087313..53961ec 100755 --- a/cores/arduino/Print.cpp +++ b/cores/arduino/Print.cpp @@ -53,8 +53,11 @@ size_t Print::print(const __FlashStringHelper *ifsh) size_t Print::print(const String &s) { - write((const uint8_t*)s.c_str(), s.length()); - return s.length(); + size_t n = 0; + for (uint16_t i = 0; i < s.length(); i++) { + n += write(s[i]); + } + return n; } size_t Print::print(const char str[]) |