Skip to content

Commit f56c37e

Browse files
Fix for #486
1 parent c9a694b commit f56c37e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

STM32F1/cores/maple/Print.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,8 @@
4747
*/
4848

4949
size_t Print::write(const char *str) {
50-
size_t n = 0;
51-
while (*str) {
52-
write(*str++);
53-
n++;
54-
}
55-
return n;
50+
if (str == NULL) return 0;
51+
return write((const uint8_t *)str, strlen(str));
5652
}
5753

5854
size_t Print::write(const void *buffer, uint32 size) {

0 commit comments

Comments
 (0)