diff options
author | Cristian Maglie <c.maglie@bug.st> | 2012-06-26 00:51:35 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2012-06-26 00:51:35 +0200 |
commit | 79521e1a15f4d8778b07477cf1f61b6c0e74b7b9 (patch) | |
tree | 421853a5f6634228bb601d9ff7506f949095aadd /cores/arduino/Print.h | |
parent | 386e059e7e6b4703e800b1b9154d52cd9b280d3e (diff) | |
parent | 2ef2f9d5c78ad4a1d265b7386e13c41d41ba410a (diff) |
Merged upstream Arduino master branch
Diffstat (limited to 'cores/arduino/Print.h')
-rwxr-xr-x | cores/arduino/Print.h | 5 |
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 *); |