From 57d03b607626e591e55e7077209e2141aa85d5be Mon Sep 17 00:00:00 2001 From: jakcron Date: Fri, 25 May 2018 22:53:19 +0800 Subject: [PATCH] [nstool] Fixed seek() typo in HashTreeWrappedIFile --- programs/nstool/source/HashTreeWrappedIFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/nstool/source/HashTreeWrappedIFile.cpp b/programs/nstool/source/HashTreeWrappedIFile.cpp index 8015761..dd54449 100644 --- a/programs/nstool/source/HashTreeWrappedIFile.cpp +++ b/programs/nstool/source/HashTreeWrappedIFile.cpp @@ -89,7 +89,7 @@ void HashTreeWrappedIFile::read(byte_t* out, size_t len) } // update offset - mDataOffset += len; + seek(mDataOffset + len); } void HashTreeWrappedIFile::read(byte_t* out, size_t offset, size_t len) @@ -169,7 +169,7 @@ void HashTreeWrappedIFile::initialiseDataLayer(const HashTreeMeta& hdr) void HashTreeWrappedIFile::readData(size_t block_offset, size_t block_num) { - seek(block_offset * mDataBlockSize); + mData->seek(block_offset * mDataBlockSize); crypto::sha::sSha256Hash hash; // determine read size