From 6626b371f60efe882079cdfe12b4fc70ad85dc78 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Tue, 24 Mar 2026 16:27:47 +0600 Subject: [PATCH] Changed config paramter clear to config parameter removal for config update functions --- source/libublsettings-config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/libublsettings-config.c b/source/libublsettings-config.c index 41bc3ad..2095876 100644 --- a/source/libublsettings-config.c +++ b/source/libublsettings-config.c @@ -1497,6 +1497,7 @@ int yon_config_update_by_key(char *key){ if (current->data) free(current->data); current->data = NULL; int size=0; + yon_config_remove_by_key(key); char *command = yon_config_parameter_get_load_command(key); config_str new_param = yon_config_load(command,&size); if (size&&!yon_char_is_empty(new_param[0])&&strcmp(new_param[0],"(null)\n")){ @@ -1514,6 +1515,7 @@ int yon_config_update_by_list(config_str keys, size_t size){ if (!size||!keys) return 0; check_config{ int params_size=0; + yon_config_remove_by_list(keys,size); config_str parameters = yon_config_get_load_parameters_by_list(¶ms_size,keys,size); if (params_size&¶meters){ char *path = yon_config_command_get_path(config_last_load_command); @@ -1531,12 +1533,12 @@ int yon_config_update_by_args(char *key, ...){ config_str keys = NULL; yon_char_parsed_add_or_create_if_exists(keys,&size,key); va_list args; - yon_config_clear_by_key(key); + yon_config_remove_by_key(key); va_start(args,key); char *cur_key = NULL; while((cur_key = va_arg(args,char*))){ yon_char_parsed_add_or_create_if_exists(keys,&size,cur_key); - yon_config_clear_by_key(cur_key); + yon_config_remove_by_key(cur_key); } int params_size=0;