From 874daede53366ed48ddaab9a749823ca291d2103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Walenciak?= Date: Tue, 19 Sep 2017 21:58:21 +0200 Subject: [PATCH] fixing broken print for 'offset' column --- src/bigtiffimage.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bigtiffimage.cpp b/src/bigtiffimage.cpp index e73a6b82..29c4927b 100644 --- a/src/bigtiffimage.cpp +++ b/src/bigtiffimage.cpp @@ -315,13 +315,13 @@ namespace Exiv2 DataBuf buf(size * count + pad); - // big data? Use 'data' as pointer to real data - if ( count*size > 8 ) // read into buffer - { - const uint64_t offset = header_.format() == Header::Tiff? + const uint64_t offset = header_.format() == Header::Tiff? conditional_byte_swap_4_array<32>(data.pData_, 0, doSwap_): conditional_byte_swap_4_array<64>(data.pData_, 0, doSwap_); + // big data? Use 'data' as pointer to real data + if ( count*size > 8 ) // read into buffer + { size_t restore = io.tell(); // save io.seek(offset, BasicIo::beg); // position io.read(buf.pData_, count * size); // read @@ -336,7 +336,7 @@ namespace Exiv2 const uint64_t address = dir_offset + 2 + i * entrySize; out << indent(depth) << Internal::stringFormat("%8u | %#06x %-25s |%10s |%9u |%10u | ", - address, tag, tagName(tag).c_str(), typeName(type), count, dir_offset); + address, tag, tagName(tag).c_str(), typeName(type), count, offset); if ( isShortType(type) ) {