Fix formatting of 0.0 with (#1210)

This commit is contained in:
Victor Zverovich
2019-06-30 06:54:41 -07:00
parent 9d97201ede
commit 260c115908
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -685,7 +685,7 @@ FMT_API bool grisu_format(Double value, buffer<char>& buf, int precision,
FMT_ASSERT(value >= 0, "value is negative");
bool fixed = (options & grisu_options::fixed) != 0;
if (value <= 0) { // <= instead of == to silence a warning.
if (precision < 0 || !fixed) {
if (precision <= 0 || !fixed) {
exp = 0;
buf.push_back('0');
} else {