From 609c0d46d978fdecf0677bf8ab5bea058da25a80 Mon Sep 17 00:00:00 2001 From: esenapaj Date: Wed, 16 Mar 2016 02:47:58 +0900 Subject: [PATCH] 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. --- Marlin/cardreader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/cardreader.cpp b/Marlin/cardreader.cpp index a94a24aa3..dbbbd551e 100644 --- a/Marlin/cardreader.cpp +++ b/Marlin/cardreader.cpp @@ -88,7 +88,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m // close() is done automatically by destructor of SdFile } else { - char pn0 = p.name[0]; + uint8_t pn0 = p.name[0]; if (pn0 == DIR_NAME_FREE) break; if (pn0 == DIR_NAME_DELETED || pn0 == '.') continue; if (longFilename[0] == '.') continue;