#1080 Fix submitted.

This commit is contained in:
Robin Mills 2016-10-19 19:06:31 +00:00
parent 5664393767
commit 54ac67d9db

View File

@ -2685,13 +2685,12 @@ namespace Exiv2 {
std::ostream& print0x9204(std::ostream& os, const Value& value, const ExifData*)
{
Rational bias = value.toRational();
if (bias.second <= 0) {
os << "(" << bias.first << "/" << bias.second << ")";
}
else if (bias.first == 0) {
if (bias.first == 0 || bias.first == 0x80000000 ) {
os << "0 EV";
}
else {
} else if (bias.second <= 0) {
os << "(" << bias.first << "/" << bias.second << ")";
} else {
int32_t d = gcd(bias.first, bias.second);
int32_t num = std::abs(bias.first) / d;
int32_t den = bias.second / d;