Skip to content

Commit

Permalink
Check m_rxValid in flush(). Fixes #118
Browse files Browse the repository at this point in the history
  • Loading branch information
dok-net committed Oct 18, 2019
1 parent d22fc69 commit 8f85d64
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "EspSoftwareSerial",
"version": "5.3.3",
"version": "5.3.4",
"keywords": [
"serial", "io", "softwareserial"
],
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=EspSoftwareSerial
version=5.3.3
version=5.3.4
author=Peter Lerup, Dirk Kaar
maintainer=Peter Lerup <[email protected]>
sentence=Implementation of the Arduino software serial for ESP8266/ESP32.
Expand Down
1 change: 1 addition & 0 deletions src/SoftwareSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 8f85d64

Please sign in to comment.