mirror of
https://github.com/synthetos/g2.git
synced 2026-09-23 04:03:47 +08:00
+5
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user