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.
This commit is contained in:
esenapaj 2016-03-16 02:47:58 +09:00
parent 2ef49a9d53
commit 609c0d46d9

View File

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