From 153220043537c603abab6ec2a66ce2c265bda330 Mon Sep 17 00:00:00 2001 From: Bernhard Date: Mon, 19 Mar 2012 20:06:58 +0100 Subject: [PATCH] found error in filenames. One array was too short. This had nothing to do with long filenames, other than if they were 12 characters exactly, which could only happen if the extension and the text before were filled completely --- Marlin/Configuration_adv.h | 3 +++ Marlin/cardreader.cpp | 2 +- Marlin/cardreader.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 0e42235d64..e2a98248e3 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -162,6 +162,9 @@ const int dropsegments=5; //everything with less than this number of steps will // be commented out otherwise #define SDCARDDETECTINVERTED +#ifdef ULTIPANEL + #undef SDCARDDETECTINVERTED +#endif //=========================================================================== //=============================Buffers ============================ //=========================================================================== diff --git a/Marlin/cardreader.cpp b/Marlin/cardreader.cpp index 4a63f727a1..c3ee3e212d 100644 --- a/Marlin/cardreader.cpp +++ b/Marlin/cardreader.cpp @@ -53,7 +53,7 @@ void CardReader::lsDive(const char *prepend,SdFile parent) while (parent.readDir(p) > 0) { - if( DIR_IS_SUBDIR(&p) && lsAction!=LS_Count && lsAction!=LS_GetFilename) + if( DIR_IS_SUBDIR(&p) && lsAction!=LS_Count && lsAction!=LS_GetFilename) // hence LS_SerialPrint { char path[13*2]; diff --git a/Marlin/cardreader.h b/Marlin/cardreader.h index e56c3a9e65..5c6e29ad81 100644 --- a/Marlin/cardreader.h +++ b/Marlin/cardreader.h @@ -45,7 +45,7 @@ public: bool saving; bool sdprinting ; bool cardOK ; - char filename[11]; + char filename[12]; bool filenameIsDir; int lastnr; //last number of the autostart; private: