#1037 Thanks to Axel for reporting and providing the patch.

This commit is contained in:
Robin Mills 2015-03-07 20:01:24 +00:00
parent a094121b27
commit 905c8563c4

View File

@ -1698,7 +1698,7 @@ namespace Exiv2 {
// see also printSi0x0017
std::ostringstream oss;
oss.copyfmt(os);
int res = static_cast<int>(100.0 * (value.toLong() / 32.0 + 5.0) + 0.5);
int res = static_cast<int>(100.0 * (static_cast<short>(value.toLong()) / 32.0 + 5.0) + 0.5);
os << std::fixed << std::setprecision(2) << res / 100.0;
os.copyfmt(oss);
}