diff --git a/library.json b/library.json index ef4b0b2..c50131f 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "EspSoftwareSerial", - "version": "5.3.3", + "version": "5.3.4", "keywords": [ "serial", "io", "softwareserial" ], diff --git a/library.properties b/library.properties index b04b486..b0ad23d 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=EspSoftwareSerial -version=5.3.3 +version=5.3.4 author=Peter Lerup, Dirk Kaar maintainer=Peter Lerup sentence=Implementation of the Arduino software serial for ESP8266/ESP32. diff --git a/src/SoftwareSerial.cpp b/src/SoftwareSerial.cpp index 34474bd..eb09944 100644 --- a/src/SoftwareSerial.cpp +++ b/src/SoftwareSerial.cpp @@ -274,6 +274,7 @@ size_t ICACHE_RAM_ATTR SoftwareSerial::write(const uint8_t * buffer, size_t size } void SoftwareSerial::flush() { + if (!m_rxValid) { return; } m_buffer->flush(); }