[libs] Fix SerialClass available() return value (#173)

Co-authored-by: descipher <120155735+GelidusResearch@users.noreply.github.com>
This commit is contained in:
Mike La Spina
2023-09-21 10:19:51 -05:00
committed by GitHub
parent 5a4b932a37
commit 3b79636d00

View File

@@ -24,7 +24,7 @@ void SerialClass::adrParse(uint8_t c) {
#endif
int SerialClass::available() {
return this->buf && this->buf->available();
return this->buf ? this->buf->available() : 0;
}
int SerialClass::peek() {