Bladeren bron

Fix CardReader::lsDive()

If comparison between signed char(-128 ~ +127) and DIR_NAME_DELETED(uint8_t const 0XE5, it's +229),
it makes incorrect result.
esenapaj 8 jaren geleden
bovenliggende
commit
609c0d46d9
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1
    1
      Marlin/cardreader.cpp

+ 1
- 1
Marlin/cardreader.cpp Bestand weergeven

@@ -88,7 +88,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
88 88
       // close() is done automatically by destructor of SdFile
89 89
     }
90 90
     else {
91
-      char pn0 = p.name[0];
91
+      uint8_t pn0 = p.name[0];
92 92
       if (pn0 == DIR_NAME_FREE) break;
93 93
       if (pn0 == DIR_NAME_DELETED || pn0 == '.') continue;
94 94
       if (longFilename[0] == '.') continue;

Laden…
Annuleren
Opslaan