Skip to content

Commit

Permalink
Fix card_eof error
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Feb 24, 2020
1 parent 130d039 commit 42fa9fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/gcode/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down

0 comments on commit 42fa9fc

Please sign in to comment.