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 13 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
 // be commented out otherwise
162
 // be commented out otherwise
163
 #define SDCARDDETECTINVERTED 
163
 #define SDCARDDETECTINVERTED 
164
 
164
 
165
+#ifdef ULTIPANEL
166
+ #undef SDCARDDETECTINVERTED
167
+#endif
165
 //===========================================================================
168
 //===========================================================================
166
 //=============================Buffers           ============================
169
 //=============================Buffers           ============================
167
 //===========================================================================
170
 //===========================================================================

+ 1
- 1
Marlin/cardreader.cpp View File

53
  
53
  
54
   while (parent.readDir(p) > 0)
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
       char path[13*2];
59
       char path[13*2];

+ 1
- 1
Marlin/cardreader.h View File

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

Loading…
Cancel
Save