From 905c8563c4fc53a36a5c359a44ce4b7782b8e483 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sat, 7 Mar 2015 20:01:24 +0000 Subject: [PATCH] #1037 Thanks to Axel for reporting and providing the patch. --- src/canonmn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }