diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index 2debe52a..ddf82127 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -721,7 +721,7 @@ template FMT_FUNC typename std::enable_if::type grisu2_format(Double value, buffer& buf, core_format_specs specs) { FMT_ASSERT(value >= 0, "value is negative"); - if (value == 0) { + if (value <= 0) { // <= instead of == to silence a warning. gen_digits_params params = process_specs(specs, 1, buf); const size_t size = 1; buf[0] = '0';