From 3571dd0ad6fba3f56bfd341bfa287bc9d51ec4ba Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 14 Oct 2017 15:54:17 -0500 Subject: [PATCH] Fix Emergency Parser Followup to #7459 --- Marlin/MarlinSerial.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/MarlinSerial.cpp b/Marlin/MarlinSerial.cpp index df176ad8e..896db69ce 100644 --- a/Marlin/MarlinSerial.cpp +++ b/Marlin/MarlinSerial.cpp @@ -175,12 +175,12 @@ // If the character is to be stored at the index just before the tail // (such that the head would advance to the current tail), the buffer is // critical, so don't write the character or advance the head. + const char c = M_UDRx; if (i != rx_buffer.tail) { - rx_buffer.buffer[h] = M_UDRx; + rx_buffer.buffer[h] = c; rx_buffer.head = i; } else { - (void)M_UDRx; #if ENABLED(SERIAL_STATS_DROPPED_RX) if (!++rx_dropped_bytes) ++rx_dropped_bytes; #endif