Clarify SD longname string size (#14148)
This commit is contained in:
		
				
					committed by
					
						
						Scott Lahteine
					
				
			
			
				
	
			
			
			
						parent
						
							5f42d3a8b4
						
					
				
				
					commit
					5515f88452
				
			@@ -175,9 +175,11 @@ private:
 | 
			
		||||
    #endif
 | 
			
		||||
 | 
			
		||||
    #if BOTH(SDSORT_USES_RAM, SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM)
 | 
			
		||||
      #define SORTED_LONGNAME_MAXLEN ((SDSORT_CACHE_VFATS) * (FILENAME_LENGTH) + 1)
 | 
			
		||||
      #define SORTED_LONGNAME_MAXLEN (SDSORT_CACHE_VFATS) * (FILENAME_LENGTH)
 | 
			
		||||
      #define SORTED_LONGNAME_STORAGE (SORTED_LONGNAME_MAXLEN + 1)
 | 
			
		||||
    #else
 | 
			
		||||
      #define SORTED_LONGNAME_MAXLEN LONG_FILENAME_LENGTH
 | 
			
		||||
      #define SORTED_LONGNAME_STORAGE SORTED_LONGNAME_MAXLEN
 | 
			
		||||
    #endif
 | 
			
		||||
 | 
			
		||||
    // Cache filenames to speed up SD menus.
 | 
			
		||||
@@ -189,10 +191,11 @@ private:
 | 
			
		||||
          static char **sortshort, **sortnames;
 | 
			
		||||
        #else
 | 
			
		||||
          static char sortshort[SDSORT_LIMIT][FILENAME_LENGTH];
 | 
			
		||||
          static char sortnames[SDSORT_LIMIT][SORTED_LONGNAME_MAXLEN];
 | 
			
		||||
        #endif
 | 
			
		||||
      #elif DISABLED(SDSORT_USES_STACK)
 | 
			
		||||
        static char sortnames[SDSORT_LIMIT][SORTED_LONGNAME_MAXLEN];
 | 
			
		||||
      #endif
 | 
			
		||||
 | 
			
		||||
      #if (ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM)) || NONE(SDSORT_CACHE_NAMES, SDSORT_USES_STACK)
 | 
			
		||||
        static char sortnames[SDSORT_LIMIT][SORTED_LONGNAME_STORAGE];
 | 
			
		||||
      #endif
 | 
			
		||||
 | 
			
		||||
      // Folder sorting uses an isDir array when caching items.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user