aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/avr/serial.c2
-rw-r--r--src/sam3x8e/serial.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/avr/serial.c b/src/avr/serial.c
index 8c0da553..0b5fea1f 100644
--- a/src/avr/serial.c
+++ b/src/avr/serial.c
@@ -115,7 +115,7 @@ char *
console_get_output(uint8_t len)
{
uint8_t tpos = readb(&transmit_pos), tmax = readb(&transmit_max);
- if (tpos == tmax) {
+ if (tpos >= tmax) {
tpos = tmax = 0;
writeb(&transmit_max, 0);
writeb(&transmit_pos, 0);
diff --git a/src/sam3x8e/serial.c b/src/sam3x8e/serial.c
index 35a7d35c..a14f97fb 100644
--- a/src/sam3x8e/serial.c
+++ b/src/sam3x8e/serial.c
@@ -120,7 +120,7 @@ char *
console_get_output(uint8_t len)
{
uint32_t tpos = readb(&transmit_pos), tmax = readb(&transmit_max);
- if (tpos == tmax) {
+ if (tpos >= tmax) {
tpos = tmax = 0;
writeb(&transmit_max, 0);
writeb(&transmit_pos, 0);