diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h index 147062fe..3fbb8060 100644 --- a/include/spdlog/fmt/bundled/format-inl.h +++ b/include/spdlog/fmt/bundled/format-inl.h @@ -698,7 +698,7 @@ FMT_API bool grisu_format(Double value, buffer& buf, int precision, buf.push_back('0'); } else { exp = -precision; - buf.resize(precision); + buf.resize(to_unsigned(precision)); std::uninitialized_fill_n(buf.data(), precision, '0'); } return true;