Browse Source

Fix card_eof error

Scott Lahteine 4 years ago
parent
commit
42fa9fc570
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/src/gcode/queue.cpp

+ 1
- 1
Marlin/src/gcode/queue.cpp View File

526
     while (length < BUFSIZE && !card_eof) {
526
     while (length < BUFSIZE && !card_eof) {
527
       const int16_t n = card.get();
527
       const int16_t n = card.get();
528
       card_eof = card.eof();
528
       card_eof = card.eof();
529
-      if (n < 0) { SERIAL_ERROR_MSG(MSG_SD_ERR_READ); continue; }
529
+      if (n < 0 && !card_eof) { SERIAL_ERROR_MSG(MSG_SD_ERR_READ); continue; }
530
       const char sd_char = (char)n;
530
       const char sd_char = (char)n;
531
       if (sd_char == '\n' || sd_char == '\r' || card_eof) {
531
       if (sd_char == '\n' || sd_char == '\r' || card_eof) {
532
 
532
 

Loading…
Cancel
Save