From e4e2e22b93996c72deb597d9c1ac7fe3e4dcbf4b Mon Sep 17 00:00:00 2001 From: user202729 <25191436+user202729@users.noreply.github.com> Date: Sun, 14 Dec 2025 12:42:24 +0700 Subject: [PATCH] Avoid failure if sizeof(unsigned long long) > 8 --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 81170881..c4b5585d 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1249,7 +1249,7 @@ FMT_CONSTEXPR20 auto do_format_decimal(Char* out, UInt value, int size) while (value >= 100) { n -= 2; if (!is_constant_evaluated() && sizeof(UInt) == 4) { - auto p = value * ((1ull << 39) / 100 + 1); + auto p = value * static_cast((1ull << 39) / 100 + 1); write2digits_i(out + n, p >> (39 - 7) & ((1 << 7) - 1)); value = static_cast(p >> 39) + (static_cast(value >= (100u << 25)) << 25);