1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

[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

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