Fixed dangling subIFD tag issue, minor changes.

v0.27.3
Andreas Huggel 17 years ago
parent f0648f6382
commit 1bec0ad25c

@ -340,6 +340,8 @@ namespace Exiv2 {
assert(!tiffPath.empty());
const TiffStructure* ts = tiffPath.top();
assert(ts != 0);
// Prevent dangling subIFD tags: Do not add a subIFD tag if it has no child
if (tiffPath.size() == 1 && ts->newTiffCompFct_ == newTiffSubIfd) return 0;
TiffComponent* tc = 0;
// To allow duplicate entries, we only check if the new component already
// exists if there is still at least one composite tag on the stack

@ -895,9 +895,9 @@ namespace Exiv2 {
#ifdef DEBUG
if (object == 0) {
std::cerr << "Warning: addPath() didn't add an entry for "
<< tiffGroupId(i->groupName())
<< i->groupName()
<< " tag 0x" << std::setw(4) << std::setfill('0')
<< i->tag() << "\n";
<< std::hex << i->tag() << "\n";
}
#endif
if (object != 0) {
@ -1331,8 +1331,7 @@ namespace Exiv2 {
std::cerr << "Error: Directory " << tiffGroupName(object->group())
<< ", entry 0x" << std::setw(4)
<< std::setfill('0') << std::hex << object->tag()
<< " has an invalid type:\n"
<< "Type = " << std::dec << type
<< " has an invalid type " << std::dec << type
<< "; skipping entry.\n";
#endif
return;
@ -1361,7 +1360,7 @@ namespace Exiv2 {
<< "directory " << tiffGroupName(object->group())
<< ", entry 0x" << std::setw(4)
<< std::setfill('0') << std::hex << object->tag()
<< " is out of bounds:\n"
<< " is out of bounds: "
<< "Offset = 0x" << std::setw(8)
<< std::setfill('0') << std::hex << offset
<< "; truncating the entry\n";
@ -1375,7 +1374,7 @@ namespace Exiv2 {
<< "directory " << tiffGroupName(object->group())
<< ", entry 0x" << std::setw(4)
<< std::setfill('0') << std::hex << object->tag()
<< " is out of bounds:\n"
<< " is out of bounds: "
<< "Offset = 0x" << std::setw(8)
<< std::setfill('0') << std::hex << offset
<< ", size = " << std::dec << size

Loading…
Cancel
Save