aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/Print.h
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2012-06-27 13:51:16 +0200
committerCristian Maglie <c.maglie@bug.st>2012-06-27 13:51:16 +0200
commit2d2050eabeaff7109ba89fdd0100556c981cf373 (patch)
tree1f6d9725b59aa02e5400a8117eeec3206d88047d /cores/arduino/Print.h
parent324023a67afd1691f12ead4388d7cdf1a9d1a6ef (diff)
parent31c24577835b0a9c7a1291ffbda1b61d96818511 (diff)
Merged master
Diffstat (limited to 'cores/arduino/Print.h')
-rwxr-xr-xcores/arduino/Print.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/cores/arduino/Print.h b/cores/arduino/Print.h
index 1af6b72..dc76150 100755
--- a/cores/arduino/Print.h
+++ b/cores/arduino/Print.h
@@ -46,7 +46,10 @@ class Print
void clearWriteError() { setWriteError(0); }
virtual size_t write(uint8_t) = 0;
- size_t write(const char *str) { return write((const uint8_t *)str, strlen(str)); }
+ size_t write(const char *str) {
+ if (str == NULL) return 0;
+ return write((const uint8_t *)str, strlen(str));
+ }
virtual size_t write(const uint8_t *buffer, size_t size);
size_t print(const __FlashStringHelper *);