瀏覽代碼

Update Stream.cpp

teensy4-core
Frank 6 年之前
父節點
當前提交
be0b44bceb
No account linked to committer's email address
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. +2
    -0
      teensy3/Stream.cpp

+ 2
- 0
teensy3/Stream.cpp 查看文件

@@ -218,6 +218,7 @@ float Stream::parseFloat(char skipChar){
//
size_t Stream::readBytes(char *buffer, size_t length)
{
if (buffer == nullptr) return 0;
size_t count = 0;
while (count < length) {
int c = timedRead();
@@ -238,6 +239,7 @@ size_t Stream::readBytes(char *buffer, size_t length)

size_t Stream::readBytesUntil(char terminator, char *buffer, size_t length)
{
if (buffer == nullptr) return 0;
if (length < 1) return 0;
length--;
size_t index = 0;

Loading…
取消
儲存