Browse Source

Settings FIELD_TEST fix

pull/1/head
Scott Lahteine 7 years ago
parent
commit
702c8acdd5
  1. 6
      Marlin/src/module/configuration_store.cpp

6
Marlin/src/module/configuration_store.cpp

@ -332,7 +332,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(DEBUG_EEPROM_READWRITE)
#define _FIELD_TEST(FIELD) \
EEPROM_ASSERT( \
eeprom_error || eeprom_index == offsetof(SettingsData, FIELD), \
eeprom_error || eeprom_index == offsetof(SettingsData, FIELD) + EEPROM_OFFSET, \
"Field " STRINGIFY(FIELD) " mismatch." \
)
#else
@ -357,7 +357,7 @@ void MarlinSettings::postprocess() {
*/
bool MarlinSettings::save() {
float dummy = 0.0f;
char ver[4] = "000";
char ver[4] = "ERR";
uint16_t working_crc = 0;
@ -840,7 +840,7 @@ void MarlinSettings::postprocess() {
// Version has to match or defaults are used
if (strncmp(version, stored_ver, 3) != 0) {
if (stored_ver[0] != 'V') {
if (stored_ver[3] != '\0') {
stored_ver[0] = '?';
stored_ver[1] = '\0';
}

Loading…
Cancel
Save