From 371f9c71cac4f0f6f7f15c10bf552255b3343660 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 19 Jul 2022 08:36:34 -0700 Subject: [PATCH] Fix even in format_dragon --- 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 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) {