From: Bernhard Date: Mon, 19 Mar 2012 19:06:58 +0000 (+0100) Subject: found error in filenames. X-Git-Tag: iwj-success-2012-07-29~50 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=153220043537c603abab6ec2a66ce2c265bda330;p=marlin.git 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 --- 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: