Commit 11ef630e authored by cutealien's avatar cutealien

Revert accidental checkin of zipreader changes.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2967 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 622bd16b
......@@ -582,7 +582,6 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
#ifdef _IRR_COMPILE_WITH_ZLIB_
const u32 uncompressedSize = e.header.DataDescriptor.UncompressedSize;
const u32 compressedSize = e.header.DataDescriptor.CompressedSize;
c8* pBuf = new c8[ uncompressedSize ];
if (!pBuf)
{
......@@ -596,7 +595,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
u8 *pcData = decryptedBuf;
if (!pcData)
{
pcData = new u8[compressedSize];
pcData = new u8[decryptedSize];
if (!pcData)
{
swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() );
......@@ -607,7 +606,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
//memset(pcData, 0, decryptedSize);
File->seek(e.Offset);
File->read(pcData, compressedSize);
File->read(pcData, decryptedSize);
}
// Setup the inflate stream.
......@@ -615,7 +614,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
s32 err;
stream.next_in = (Bytef*)pcData;
stream.avail_in = (uInt)compressedSize;
stream.avail_in = (uInt)decryptedSize;
stream.next_out = (Bytef*)pBuf;
stream.avail_out = uncompressedSize;
stream.zalloc = (alloc_func)0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment