From c676ecc0267a1cee8b23d58c97e5b85fdf0c44a6 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 7 Jan 2009 19:23:24 -0500 Subject: [PATCH] Fixed regression in printing floats with no precision (bug 3447, r=ds). --- core/sm_stringutil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/sm_stringutil.cpp b/core/sm_stringutil.cpp index 26539e4b..2cb3bfef 100644 --- a/core/sm_stringutil.cpp +++ b/core/sm_stringutil.cpp @@ -281,7 +281,7 @@ void AddFloat(char **buf_p, size_t &maxlen, double fval, int width, int prec, in } // write the fraction part - if (maxlen) + if (maxlen && prec) { *buf++ = '.'; maxlen--;