Преглед на файлове

add nullptr check

teensy4-core
Frank преди 6 години
родител
ревизия
fc0677b9a6
No account linked to committer's email address
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. +1
    -0
      teensy4/Print.cpp

+ 1
- 0
teensy4/Print.cpp Целия файл



size_t Print::write(const uint8_t *buffer, size_t size) size_t Print::write(const uint8_t *buffer, size_t size)
{ {
if (buffer == nullptr) return 0;
size_t count = 0; size_t count = 0;
while (size--) count += write(*buffer++); while (size--) count += write(*buffer++);
return count; return count;

Loading…
Отказ
Запис