diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2021-01-01 20:41:40 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2021-01-01 20:41:40 (GMT) |
commit | 7b320516abf871eefe009ff6fe4fb86ed921fed9 (patch) | |
tree | 41fe1257417dff7ef630c48dba906ce26a29afec /src/glibext | |
parent | 406a8a3c8eab4691ff32271ca906e93556d845dc (diff) |
Fixed a hardcoded type confusion and a mistake with empty state definitions.
Diffstat (limited to 'src/glibext')
-rw-r--r-- | src/glibext/configuration.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/glibext/configuration.c b/src/glibext/configuration.c index 8746bfd..b4eb784 100644 --- a/src/glibext/configuration.c +++ b/src/glibext/configuration.c @@ -655,7 +655,9 @@ ConfigParamState g_config_param_get_state(GCfgParam *param) if (param->def_empty || param->cur_empty) { param->cached_state = (param->def_empty && param->cur_empty ? CPS_DEFAULT : CPS_CHANGED); - param->cached_state |= CPS_EMPTY; + + if (param->cur_empty) + param->cached_state |= CPS_EMPTY; goto gcpgs_recached; @@ -1131,7 +1133,7 @@ static void g_config_group_load(GCfgGroup *group, GGenConfig *config, xmlXPathCo { asprintf(&key, "%s.%s", group->root, NODE_FROM_PATH_OBJ(xpathObj, i)->name); - param = g_config_param_new(key, CPT_INTEGER, -1); + param = g_config_param_new_empty(key, group->type); _g_generic_config_add_param(config, param, false); free(key); |