diff --git a/src/canonmn.cpp b/src/canonmn.cpp index d5a68326..9302ebb3 100644 --- a/src/canonmn.cpp +++ b/src/canonmn.cpp @@ -1698,7 +1698,7 @@ namespace Exiv2 { // see also printSi0x0017 std::ostringstream oss; oss.copyfmt(os); - int res = static_cast(100.0 * (value.toLong() / 32.0 + 5.0) + 0.5); + int res = static_cast(100.0 * (static_cast(value.toLong()) / 32.0 + 5.0) + 0.5); os << std::fixed << std::setprecision(2) << res / 100.0; os.copyfmt(oss); }