Skip to content

Commit

Permalink
Fix EEPROM array size bug (#16475)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vertabreak authored and thinkyhead committed Jan 8, 2020
1 parent 994c695 commit d26c323
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Marlin/src/module/configuration_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(planner.extruder_advance_K);
#else
dummy = 0;
for (uint8_t q = _MIN(EXTRUDERS, 1); q--;) EEPROM_WRITE(dummy);
for (uint8_t q = _MAX(EXTRUDERS, 1); q--;) EEPROM_WRITE(dummy);
#endif
}

Expand Down Expand Up @@ -1934,7 +1934,7 @@ void MarlinSettings::postprocess() {
// Linear Advance
//
{
float extruder_advance_K[_MIN(EXTRUDERS, 1)];
float extruder_advance_K[_MAX(EXTRUDERS, 1)];
_FIELD_TEST(planner_extruder_advance_K);
EEPROM_READ(extruder_advance_K);
#if ENABLED(LIN_ADVANCE)
Expand Down

0 comments on commit d26c323

Please sign in to comment.