Added -ea argument checking

pull/57/head
parent ecd0d5118a
commit d92b2fcf60
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -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);

Loading…
Cancel
Save