diff --git a/include/exiv2/value.hpp b/include/exiv2/value.hpp index 27690e50..051050ab 100644 --- a/include/exiv2/value.hpp +++ b/include/exiv2/value.hpp @@ -13,6 +13,7 @@ #include #include #include +#include // ***************************************************************************** // namespace extensions @@ -1251,7 +1252,7 @@ class ValueType : public Value { const auto v = value_.at(n); if (static_cast(std::numeric_limits::min()) <= v && v <= static_cast(std::numeric_limits::max())) { - return static_cast(v); + return static_cast(std::round(v)); } else { return 0; } diff --git a/test/data/issue_2160_poc.jpg b/test/data/issue_2160_poc.jpg new file mode 100644 index 00000000..5716ff41 Binary files /dev/null and b/test/data/issue_2160_poc.jpg differ