aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/Print.h
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2012-06-26 00:51:35 +0200
committerCristian Maglie <c.maglie@bug.st>2012-06-26 00:51:35 +0200
commit79521e1a15f4d8778b07477cf1f61b6c0e74b7b9 (patch)
tree421853a5f6634228bb601d9ff7506f949095aadd /cores/arduino/Print.h
parent386e059e7e6b4703e800b1b9154d52cd9b280d3e (diff)
parent2ef2f9d5c78ad4a1d265b7386e13c41d41ba410a (diff)
Merged upstream Arduino master branch
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 *);