[Theme] small change in formatting code.

This commit is contained in:
Dave Davenport 2022-04-04 23:33:48 +02:00
parent a97fa4a199
commit 597157e0c9
1 changed files with 4 additions and 2 deletions

View File

@ -251,8 +251,10 @@ void rofi_theme_free(ThemeWidget *widget) {
* print
*/
inline static void printf_double(double d) {
char buf[G_ASCII_DTOSTR_BUF_SIZE];
g_ascii_formatd(buf, G_ASCII_DTOSTR_BUF_SIZE, "%.4lf", d);
char buf[G_ASCII_DTOSTR_BUF_SIZE + 1] = {
0,
};
g_ascii_dtostr(buf, G_ASCII_DTOSTR_BUF_SIZE, d);
fputs(buf, stdout);
}