Test fix for logrotate configuration crash

pull/62/head
parent 59f3fcb718
commit 1662e785db

@ -948,8 +948,6 @@ logrotate_configure_window *yon_logrotate_window_new(char *paths, logrotate_wind
int sizenumber=0;
finalsize = yon_size_convert_automatic(finalsize,&sizenumber);
char *fin = yon_char_from_float(finalsize);
char *unw = strstr(fin,",")+3;
fin = yon_char_divide(fin,strlen(fin)-strlen(unw));
gtk_label_set_text(GTK_LABEL(window->LogSizeLabel),yon_char_append(fin,yon_size_get_letter_from_int(sizenumber)));
}

@ -622,8 +622,8 @@ char *yon_char_from_float(float int_to_convert)
{
convert_check = convert_check / 10;
}
char *ch = g_malloc0(i * sizeof(char) + 1);
sprintf(ch, "%f", int_to_convert);
char *ch = g_malloc0((i + 9)* sizeof(char));
sprintf(ch, "%.2f", int_to_convert);
return ch;
}

Loading…
Cancel
Save