Update src/tags_int.cpp

Co-authored-by: Christoph Hasse <hassec@users.noreply.github.com>
(cherry picked from commit ad2e7221b498258bd04188b66f6da5cefd101e73)
main
Kevin Backhouse 4 years ago committed by mergify-bot
parent 52d70c8924
commit 8d5e70379e

@ -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<uint32_t>::max()) {
if (x <= std::numeric_limits<uint32_t>::max()) {
ur.second = static_cast<uint32_t>(x);
}
}

Loading…
Cancel
Save