add sort alpha section to other LPC1768 boards
This commit is contained in:
Bob-the-Kuhn
2017-10-27 13:42:19 -05:00
parent 31e96935f7
commit b7a66742dd
6 changed files with 66 additions and 6 deletions

View File

@ -134,6 +134,9 @@
#define FILENAME_LENGTH 13 // Number of UTF-16 characters per entry
// Number of VFAT entries used. Each entry has 13 UTF-16 characters
#ifdef MAX_VFAT_ENTRIES
#undef MAX_VFAT_ENTRIES
#endif
#if ENABLED(SCROLL_LONG_FILENAMES)
#define MAX_VFAT_ENTRIES (5)
#else

View File

@ -747,7 +747,7 @@ void CardReader::updir() {
strncpy(sortnames[i], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
sortnames[i][SORTED_LONGNAME_MAXLEN - 1] = '\0';
#else
strcpy(sortnames[i], SORTED_LONGNAME_MAXLEN);
strncpy(sortnames[i], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
#endif
#if ENABLED(SDSORT_CACHE_NAMES)
strcpy(sortshort[i], filename);
@ -849,7 +849,7 @@ void CardReader::updir() {
strncpy(sortnames[0], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
sortnames[0][SORTED_LONGNAME_MAXLEN - 1] = '\0';
#else
strcpy(sortnames[0], SORTED_LONGNAME_MAXLEN);
strncpy(sortnames[0], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
#endif
#if ENABLED(SDSORT_CACHE_NAMES)
strcpy(sortshort[0], filename);