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 0e42235..e2a9824 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 4a63f72..c3ee3e2 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 e56c3a9..5c6e29a 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: -- 2.30.2