From 8d5e70379ea1435ab2fac73f11a11daa07236bf5 Mon Sep 17 00:00:00 2001 From: Kevin Backhouse Date: Mon, 2 Aug 2021 22:32:35 +0100 Subject: [PATCH] Update src/tags_int.cpp Co-authored-by: Christoph Hasse (cherry picked from commit ad2e7221b498258bd04188b66f6da5cefd101e73) --- src/tags_int.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tags_int.cpp b/src/tags_int.cpp index b08acb82..a1d6a88c 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -2610,7 +2610,7 @@ namespace Exiv2 { // Add 0.5 for rounding. const double x = tmp + 0.5; // Check that x is within the range of a uint32_t before casting. - if (0 <= x && x <= std::numeric_limits::max()) { + if (x <= std::numeric_limits::max()) { ur.second = static_cast(x); } }