From: Vsevolod Stakhov Date: Mon, 28 Apr 2014 20:39:08 +0000 (-0700) Subject: Fix printing of floating point values. X-Git-Tag: 0.7.0~268 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c551b9cc8d3dd804b674f76c9171320b85484516;p=thirdparty%2Frspamd.git Fix printing of floating point values. --- diff --git a/src/libutil/printf.c b/src/libutil/printf.c index 195c045201..ba30587fc4 100644 --- a/src/libutil/printf.c +++ b/src/libutil/printf.c @@ -519,6 +519,9 @@ rspamd_vprintf_common (rspamd_printf_append_func func, gpointer apd, const gchar *p++ = '-'; f = -f; } + if (frac_width == 0) { + frac_width = 6; + } ui64 = (gint64) f;