瀏覽代碼
add nullptr check
teensy4-core
Frank
6 年之前
No account linked to committer's email address
共有
1 個文件被更改,包括
1 次插入 和
0 次删除
-
teensy3/Print.cpp
|
|
@@ -39,6 +39,7 @@ |
|
|
|
|
|
|
|
size_t Print::write(const uint8_t *buffer, size_t size) |
|
|
|
{ |
|
|
|
if (buffer == nullptr) return 0; |
|
|
|
size_t count = 0; |
|
|
|
while (size--) count += write(*buffer++); |
|
|
|
return count; |