[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:37:11 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=595454f

The following commit has been merged in the master branch:
commit 595454f39fc268dc4ab8a4ffbb53bbab95b878bf
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sun Jun 26 11:04:27 2005 +0000

    Fixed ExifTags::printTag to call the print function only if there is at least one component in the value. Fixes bug #433. Fixed printLong print function to survive if the value is a Rational with a 0 denominator.
---
 src/tags.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/tags.cpp b/src/tags.cpp
index 08eaf2a..d129ab1 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -507,6 +507,7 @@ namespace Exiv2 {
                                      IfdId ifdId,
                                      const Value& value)
     {
+        if (value.count() == 0) return os;
         PrintFct fct = printValue;
         if (isExifIfd(ifdId)) { 
             int idx = tagInfoIdx(tag, ifdId);
@@ -734,8 +735,10 @@ namespace Exiv2 {
 
     std::ostream& printLong(std::ostream& os, const Value& value)
     {
-        return os << value.toLong();
-    }
+        Rational r = value.toRational();
+        if (r.second != 0) return os << static_cast<long>(r.first) / r.second;
+        return os << "(" << value << ")";
+    } // printLong
 
     std::ostream& printFloat(std::ostream& os, const Value& value)
     {

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list