This commit is contained in:
Igor Pavlov
2015-11-03 00:00:00 +00:00
committed by Kornel Lesiński
parent a663a6deb7
commit 7c8a265a15
51 changed files with 877 additions and 546 deletions

View File

@@ -255,7 +255,12 @@ HRESULT CUnpacker::Unpack2(
_solidIndex = resource.SolidIndex;
_unpackedChunkIndex = chunkIndex;
if (cur < offsetInChunk)
return E_FAIL;
cur -= offsetInChunk;
if (cur > rem)
cur = (size_t)rem;