Browse Source

Fix dir_names array definition. Prevents overrun

Alex Voinea 3 years ago
parent
commit
f6ae379077
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Firmware/Marlin.h
  2. 1 1
      Firmware/Marlin_main.cpp

+ 1 - 1
Firmware/Marlin.h

@@ -352,7 +352,7 @@ extern bool mesh_bed_run_from_menu;
 
 extern bool sortAlpha;
 
-extern char dir_names[3][9];
+extern char dir_names[MAX_DIR_DEPTH][9];
 
 extern int8_t lcd_change_fil_state;
 // save/restore printing

+ 1 - 1
Firmware/Marlin_main.cpp

@@ -228,7 +228,7 @@ bool fan_state[2];
 int fan_edge_counter[2];
 int fan_speed[2];
 
-char dir_names[3][9];
+char dir_names[MAX_DIR_DEPTH][9];
 
 bool sortAlpha = false;