From bd4004e9633423d8a50e619dc84aee58d877771a Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Tue, 28 Apr 2015 11:12:58 +0000 Subject: [PATCH] #934 exiv2json.cpp threw an exception on toLong() and I changed it to std::atoi. The value is '' (the empty string). The following key seems to be somehow and puzzlingly broken: 0x8827 Photo ISOSpeedRatings Short 0 --- samples/exiv2json.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/exiv2json.cpp b/samples/exiv2json.cpp index 317598c3..0149d860 100644 --- a/samples/exiv2json.cpp +++ b/samples/exiv2json.cpp @@ -160,7 +160,7 @@ void push(Jzon::Node& node,const std::string& key,T i) case Exiv2::signedByte: case Exiv2::signedShort: case Exiv2::signedLong: - STORE(node,key,(int)i->value().toLong()); + STORE(node,key,std::atoi(value.c_str()) ); break; case Exiv2::tiffFloat: