diff --git a/src/makernote.cpp b/src/makernote.cpp index 1a71eded..b08efefe 100644 --- a/src/makernote.cpp +++ b/src/makernote.cpp @@ -865,19 +865,19 @@ namespace Exiv2 { uint32_t size, ByteOrder /*byteOrder*/) { - if (size > 8 && std::string(reinterpret_cast(pData), 8) - == std::string("PENTAX \0", 8)) { - // Require at least the header and an IFD with 1 entry - if (size < PentaxDngMnHeader::sizeOfSignature() + 18) return 0; - return newPentaxDngMn2(tag, group, pentaxId); - } else - if (size > 4 && std::string(reinterpret_cast(pData), 4) - == std::string("AOC\0", 4)) { - // Require at least the header and an IFD with 1 entry - if (size < PentaxMnHeader::sizeOfSignature() + 18) return 0; - return newPentaxMn2(tag, group, pentaxId); - } else - return 0; + if ( size > 8 + && std::string(reinterpret_cast(pData), 8) == std::string("PENTAX \0", 8)) { + // Require at least the header and an IFD with 1 entry + if (size < PentaxDngMnHeader::sizeOfSignature() + 18) return 0; + return newPentaxDngMn2(tag, group, pentaxDngId); + } + else if ( size > 4 + && std::string(reinterpret_cast(pData), 4) == std::string("AOC\0", 4)) { + // Require at least the header and an IFD with 1 entry + if (size < PentaxMnHeader::sizeOfSignature() + 18) return 0; + return newPentaxMn2(tag, group, pentaxId); + } else + return 0; } TiffComponent* newPentaxMn2(uint16_t tag,