diff --git a/include/fmt/format.h b/include/fmt/format.h index 749f8e4a..83b2a222 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2989,7 +2989,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp value, upper = &upper_store; } } - int even = static_cast(value.f & 1); + int even = static_cast((value.f & 1) == 0); if (!upper) upper = &lower; if ((flags & dragon::fixup) != 0) { if (add_compare(numerator, *upper, denominator) + even <= 0) {