diff --git a/source/libublsettings-config.c b/source/libublsettings-config.c index 28b8329..158205b 100644 --- a/source/libublsettings-config.c +++ b/source/libublsettings-config.c @@ -438,9 +438,12 @@ int yon_config_load_config(YON_CONFIG_TYPE config_type, ...){ yon_char_remove_last_symbol(parameters[i],'\n'); char *value = yon_char_new(parameters[i]); char *parameter = yon_char_divide_search(value,"=",-1); - char *section = yon_char_divide_search(parameter," ",-1); - free(yon_char_divide(section,yon_char_find_last(section,'/'))); - yon_char_remove_last_symbol(section,']'); + char *section = NULL; + if (strstr(parameter," -ea ")){ + section = yon_char_divide_search(parameter," ",-1); + free(yon_char_divide(section,yon_char_find_last(section,'/'))); + yon_char_remove_last_symbol(section,']'); + } yon_char_remove_brackets(value); char *get_parameter = yon_char_unite("[",section,"]"," ", value,NULL);