Lesson learned: don't edit code in the browser

Re-fixes #2
This commit is contained in:
Rob Giseburt
2019-10-23 16:35:06 -05:00
parent 46ee6b7384
commit 100a600793
+5 -3
View File
@@ -128,9 +128,11 @@ static void _set_defa(nvObj_t *nv, bool print)
cm_set_units_mode(MILLIMETERS); // must do inits in MM mode
for (nv->index=0; nv_index_is_single(nv->index); nv->index++) {
if (cfgArray[nv->index].flags & F_INITIALIZE) {
if ((cfgArray[nv->index].flags & TYPE_INTEGER) ||
(cfgArray[nv->index].flags & TYPE_BOOLEAN)) { // Fix for Issue #357
nv->valuetype = cfgArray[nv->index].flags & (TYPE_INTEGER|TYPE_BOOLEAN);
if (cfgArray[nv->index].flags & TYPE_INTEGER) {
nv->valuetype = TYPE_INTEGER;
nv->value_int = cfgArray[nv->index].def_value;
} else if (cfgArray[nv->index].flags & TYPE_BOOLEAN) {
nv->valuetype = TYPE_BOOLEAN;
nv->value_int = cfgArray[nv->index].def_value;
} else {
nv->valuetype = TYPE_FLOAT;