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
Bernhard 12 years ago
parent
commit
1532200435
3 changed files with 5 additions and 2 deletions
  1. 3
    0
      Marlin/Configuration_adv.h
  2. 1
    1
      Marlin/cardreader.cpp
  3. 1
    1
      Marlin/cardreader.h

+ 3
- 0
Marlin/Configuration_adv.h View File

@@ -162,6 +162,9 @@ const int dropsegments=5; //everything with less than this number of steps will
162 162
 // be commented out otherwise
163 163
 #define SDCARDDETECTINVERTED 
164 164
 
165
+#ifdef ULTIPANEL
166
+ #undef SDCARDDETECTINVERTED
167
+#endif
165 168
 //===========================================================================
166 169
 //=============================Buffers           ============================
167 170
 //===========================================================================

+ 1
- 1
Marlin/cardreader.cpp View File

@@ -53,7 +53,7 @@ void  CardReader::lsDive(const char *prepend,SdFile parent)
53 53
  
54 54
   while (parent.readDir(p) > 0)
55 55
   {
56
-    if( DIR_IS_SUBDIR(&p) && lsAction!=LS_Count && lsAction!=LS_GetFilename)
56
+    if( DIR_IS_SUBDIR(&p) && lsAction!=LS_Count && lsAction!=LS_GetFilename) // hence LS_SerialPrint
57 57
     {
58 58
 
59 59
       char path[13*2];

+ 1
- 1
Marlin/cardreader.h View File

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

Loading…
Cancel
Save