Browse Source

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
pull/1/head
Bernhard 13 years ago
parent
commit
1532200435
  1. 3
      Marlin/Configuration_adv.h
  2. 2
      Marlin/cardreader.cpp
  3. 2
      Marlin/cardreader.h

3
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 // be commented out otherwise
#define SDCARDDETECTINVERTED #define SDCARDDETECTINVERTED
#ifdef ULTIPANEL
#undef SDCARDDETECTINVERTED
#endif
//=========================================================================== //===========================================================================
//=============================Buffers ============================ //=============================Buffers ============================
//=========================================================================== //===========================================================================

2
Marlin/cardreader.cpp

@ -53,7 +53,7 @@ void CardReader::lsDive(const char *prepend,SdFile parent)
while (parent.readDir(p) > 0) 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]; char path[13*2];

2
Marlin/cardreader.h

@ -45,7 +45,7 @@ public:
bool saving; bool saving;
bool sdprinting ; bool sdprinting ;
bool cardOK ; bool cardOK ;
char filename[11]; char filename[12];
bool filenameIsDir; bool filenameIsDir;
int lastnr; //last number of the autostart; int lastnr; //last number of the autostart;
private: private:

Loading…
Cancel
Save