1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-30 07:17:59 +00:00

Fix card_eof error

This commit is contained in:
Scott Lahteine 2020-02-24 10:58:54 -06:00
parent 130d0395d0
commit 42fa9fc570

View File

@ -526,7 +526,7 @@ void GCodeQueue::get_serial_commands() {
while (length < BUFSIZE && !card_eof) { while (length < BUFSIZE && !card_eof) {
const int16_t n = card.get(); const int16_t n = card.get();
card_eof = card.eof(); card_eof = card.eof();
if (n < 0) { SERIAL_ERROR_MSG(MSG_SD_ERR_READ); continue; } if (n < 0 && !card_eof) { SERIAL_ERROR_MSG(MSG_SD_ERR_READ); continue; }
const char sd_char = (char)n; const char sd_char = (char)n;
if (sd_char == '\n' || sd_char == '\r' || card_eof) { if (sd_char == '\n' || sd_char == '\r' || card_eof) {