From 37fca3d23f844a85f5fddafa0e6f0ed1056b93db Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 17 Nov 2009 21:50:48 +0000 Subject: [PATCH] ZlibPackageDataReader::ReadData(): We were always copying the data from the start of the chunk, which is wrong for non chunk aligned offsets. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34101 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/package/PackageDataReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/package/PackageDataReader.cpp b/src/bin/package/PackageDataReader.cpp index 29303db668..06b3407b37 100644 --- a/src/bin/package/PackageDataReader.cpp +++ b/src/bin/package/PackageDataReader.cpp @@ -193,7 +193,7 @@ public: // copy data to buffer size_t toCopy = std::min(size, (size_t)fChunkSize - inChunkOffset); - memcpy(buffer, fUncompressBuffer, toCopy); + memcpy(buffer, fUncompressBuffer + inChunkOffset, toCopy); buffer += toCopy; size -= toCopy;