diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index 055f0c67..75575b32 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1843,12 +1843,9 @@ FMT_INLINE int remove_trailing_zeros(uint32_t& n) noexcept { int s = 0; while (true) { auto q = rotr(n * mod_inv_25, 2); - if (q <= std::numeric_limits::max() / 100) { - n = q; - s += 2; - } else { - break; - } + if (q > std::numeric_limits::max() / 100) break; + n = q; + s += 2; } auto q = rotr(n * mod_inv_5, 1); if (q <= std::numeric_limits::max() / 10) {