Skip to main content
Sign in
Snippets Groups Projects
Commit 42fa9fc5 authored by Scott Lahteine's avatar Scott Lahteine
Browse files

Fix card_eof error

parent 130d0395
Branches
Tags
No related merge requests found
......@@ -526,7 +526,7 @@ void GCodeQueue::get_serial_commands() {
while (length < BUFSIZE && !card_eof) {
const int16_t n = card.get();
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;
if (sd_char == '\n' || sd_char == '\r' || card_eof) {
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment