Browse Source

Reduce reserved space on stack for LONG_FILENAME_LENGTH by 1 in presort

LONG_FILENAME_LENGTH already includes a +1 for the \0 string termination
Alex Voinea 3 years ago
parent
commit
b72ce00183
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Firmware/cardreader.cpp

+ 1 - 1
Firmware/cardreader.cpp

@@ -786,7 +786,7 @@ void CardReader::presort() {
 		// By default re-read the names from SD for every compare
 		// retaining only two filenames at a time. This is very
 		// slow but is safest and uses minimal RAM.
-		char name1[LONG_FILENAME_LENGTH + 1];
+		char name1[LONG_FILENAME_LENGTH];
 		uint16_t crmod_time_bckp;
 		uint16_t crmod_date_bckp;