From a1877c04e2b38c79411ebf803cd507d9511b2da0 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Tue, 27 Sep 2016 19:26:18 +0000 Subject: [PATCH] #1230 and #1199 Correction to r4575 --- src/webpimage.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/webpimage.cpp b/src/webpimage.cpp index e356058c..2e1f65e6 100644 --- a/src/webpimage.cpp +++ b/src/webpimage.cpp @@ -442,8 +442,8 @@ namespace Exiv2 { } io_->seek(0,BasicIo::beg); // rewind - uint64_t offset = (uint64_t) io_->tell(); while ( !io_->eof() && (uint64_t) io_->tell() < filesize) { + uint64_t offset = (uint64_t) io_->tell(); byte size_buff[WEBP_TAG_SIZE]; io_->read(chunkId.pData_, WEBP_TAG_SIZE); io_->read(size_buff, WEBP_TAG_SIZE); @@ -453,7 +453,7 @@ namespace Exiv2 { if ( bPrint ) { out << Internal::indent(depth) - << Internal::stringFormat(" %s | %8u | %8u | ", (const char*)chunkId.pData_,size,offset) + << Internal::stringFormat(" %s | %8u | %8u | ", (const char*)chunkId.pData_,size,(uint32_t)offset) << Internal::binaryToString(payload,payload.size_>32?32:payload.size_) << std::endl; } @@ -472,7 +472,6 @@ namespace Exiv2 { } if ( offset && io_->tell() % 2 ) io_->seek(+1, BasicIo::cur); // skip padding byte on sub-chunks - offset = io_->tell(); } } }