]> source.dussan.org Git - rspamd.git/commitdiff
Fix printing of floating point values.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 28 Apr 2014 20:39:08 +0000 (13:39 -0700)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 28 Apr 2014 20:39:08 +0000 (13:39 -0700)
src/libutil/printf.c

index 195c045201cf63c14c07a1d61d6655a8e3138464..ba30587fc43b996dcd5aa9d005781e0d2c7b9380 100644 (file)
@@ -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;