Browse Source

Fix EEPROM array size bug (#16475)

Vertabreaker 4 years ago
parent
commit
d26c32375e
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/src/module/configuration_store.cpp

+ 2
- 2
Marlin/src/module/configuration_store.cpp View File

1145
         EEPROM_WRITE(planner.extruder_advance_K);
1145
         EEPROM_WRITE(planner.extruder_advance_K);
1146
       #else
1146
       #else
1147
         dummy = 0;
1147
         dummy = 0;
1148
-        for (uint8_t q = _MIN(EXTRUDERS, 1); q--;) EEPROM_WRITE(dummy);
1148
+        for (uint8_t q = _MAX(EXTRUDERS, 1); q--;) EEPROM_WRITE(dummy);
1149
       #endif
1149
       #endif
1150
     }
1150
     }
1151
 
1151
 
1934
       // Linear Advance
1934
       // Linear Advance
1935
       //
1935
       //
1936
       {
1936
       {
1937
-        float extruder_advance_K[_MIN(EXTRUDERS, 1)];
1937
+        float extruder_advance_K[_MAX(EXTRUDERS, 1)];
1938
         _FIELD_TEST(planner_extruder_advance_K);
1938
         _FIELD_TEST(planner_extruder_advance_K);
1939
         EEPROM_READ(extruder_advance_K);
1939
         EEPROM_READ(extruder_advance_K);
1940
         #if ENABLED(LIN_ADVANCE)
1940
         #if ENABLED(LIN_ADVANCE)

Loading…
Cancel
Save