2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:47:42 +00:00

CResFactory bug fixes

This commit is contained in:
Jack Andersen
2017-10-27 21:08:48 -10:00
parent 2f4cddd3d2
commit bb10aa9844
15 changed files with 87 additions and 44 deletions

View File

@@ -149,11 +149,15 @@ atUint64 CZipInputStream::readUBytesToBuf(void *buf, atUint64 len)
{
x30_zstrm.next_out = (Bytef*)buf;
x30_zstrm.avail_out = len;
x30_zstrm.total_out = 0;
while (x30_zstrm.avail_out != 0)
{
atUint64 readSz = x28_strm->readUBytesToBuf(x24_compBuf.get(), 4096);
x30_zstrm.avail_in = readSz;
x30_zstrm.next_in = x24_compBuf.get();
if (x30_zstrm.avail_in == 0)
{
atUint64 readSz = x28_strm->readUBytesToBuf(x24_compBuf.get(), 4096);
x30_zstrm.avail_in = readSz;
x30_zstrm.next_in = x24_compBuf.get();
}
if (inflate(&x30_zstrm, Z_NO_FLUSH) != Z_OK)
break;
}