diff --git a/source/libublsettings-char.c b/source/libublsettings-char.c index d4c17c4..3e81c68 100644 --- a/source/libublsettings-char.c +++ b/source/libublsettings-char.c @@ -300,6 +300,7 @@ char *yon_char_replace_single(char *source, char *find, char *replace){ char **yon_char_parse(const char * parameters, int *size, char * divider){ *size=0; if (parameters&&!yon_char_is_empty(divider)){ + if (!strstr(parameters,divider)) return yon_char_parsed_new(size,parameters,NULL); char **string=NULL; char *paramline=yon_char_new(parameters); char *param = strstr(paramline,divider); @@ -309,7 +310,7 @@ char **yon_char_parse(const char * parameters, int *size, char * divider){ string[(*size)] = malloc(cur_size+1); memset(string[(*size)],0,cur_size+1); memcpy(string[(*size)],paramline,cur_size); - memcpy(paramline,paramline+strlen(string[(*size)])+strlen(divider),strlen(param)); + memmove(paramline,paramline+strlen(string[(*size)])+strlen(divider),strlen(param) - strlen(divider) + 1); // string[(*size)]=yon_char_divide(paramline,strlen(paramline)-strlen(param)); *size=(*size)+1; } diff --git a/source/libublsettings-config.c b/source/libublsettings-config.c index 0b216fe..631d4a6 100644 --- a/source/libublsettings-config.c +++ b/source/libublsettings-config.c @@ -1263,7 +1263,6 @@ char *yon_config_save_simple(YON_CONFIG_TYPE target, char *path){ if (parameters){ yon_char_parsed_prepend_strings(parameters,parameters_size,ubconfig_set_command(path)); char *final_command = yon_char_parsed_to_string(parameters,parameters_size,";"); - printf("%s\n",final_command); FILE *file = popen(final_command,"r"); if (file){ int file_size=0; @@ -1353,14 +1352,12 @@ int yon_config_save_registered(char *path){ for_dictionaries(dct,sections_add){ char *command = yon_dictionary_get_data(dct,char*); yon_launch(command); - printf("%s\n",command); } yon_dictionary_free_all(sections_add,free); if (sections_remove) for_dictionaries(dct,sections_remove){ char *command = yon_dictionary_get_data(dct,char*); yon_launch(command); - printf("%s\n",command); } yon_dictionary_free_all(sections_remove,free); if (sections_add||sections_remove) diff --git a/source/libublsettings-locale.c b/source/libublsettings-locale.c index befb2d2..eb68d28 100644 --- a/source/libublsettings-locale.c +++ b/source/libublsettings-locale.c @@ -61,7 +61,7 @@ void yon_locale_set(struct yon_locale *target,char *locale_name){ free(target->title); target->title = yon_char_new(temp); } - yon_char_parsed_free(locale_string,size); + // yon_char_parsed_free(locale_string,size); free(path); }