From 5432473e3ec1d9cfb2cfeeb7e1fb1a9fc9c012ee Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 8 Aug 2024 12:04:59 +0600 Subject: [PATCH] Fixed config loading --- source/libublsettings.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/libublsettings.c b/source/libublsettings.c index 222a273..783a43f 100644 --- a/source/libublsettings.c +++ b/source/libublsettings.c @@ -1259,9 +1259,8 @@ int yon_config_load_config(YON_CONFIG_TYPE config_type, ...){ config_str parsed = yon_config_load(command[i],&parsed_size); int command_parsed_size=0; config_str command_parsed = yon_char_parse(command[i],&command_parsed_size," "); - if (!strstr(command_parsed[5],"[*]")){ + if (config_type==YON_CONFIG_DEFAULT&&!strstr(command_parsed[5],"[*]")){ yon_config_register(command_parsed[5], command[i],NULL); - yon_config_set_status(command_parsed[5],0); } yon_char_parsed_free(command_parsed,command_parsed_size); if (parsed_size>0){ @@ -1273,8 +1272,12 @@ int yon_config_load_config(YON_CONFIG_TYPE config_type, ...){ yon_char_remove_brackets(current_value); char *current_command = yon_char_new(command[i]); current_command = yon_config_replace_parameter(current_command,key,5); + char *cur_data = config(key); + int cur_ignore = yon_config_check_ignore(key); + if ((cur_ignore&¤t_value)||(!cur_ignore)) yon_config_register(key,current_command,current_value); if (config_type==YON_CONFIG_DEFAULT){ + yon_config_set_ignore(key); yon_config_set_status(key,-2); } }