Fix even in format_dragon

This commit is contained in:
Victor Zverovich 2022-07-19 08:36:34 -07:00
parent 91abfcd6cf
commit 371f9c71ca

View File

@ -2989,7 +2989,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value,
upper = &upper_store;
}
}
int even = static_cast<int>(value.f & 1);
int even = static_cast<int>((value.f & 1) == 0);
if (!upper) upper = &lower;
if ((flags & dragon::fixup) != 0) {
if (add_compare(numerator, *upper, denominator) + even <= 0) {