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

Lots of CResFactory fixes

This commit is contained in:
Jack Andersen
2017-10-27 00:10:32 -10:00
parent 8346f56595
commit 2f4cddd3d2
29 changed files with 210 additions and 139 deletions

View File

@@ -149,13 +149,14 @@ atUint64 CZipInputStream::readUBytesToBuf(void *buf, atUint64 len)
{
x30_zstrm.next_out = (Bytef*)buf;
x30_zstrm.avail_out = len;
if (!x30_zstrm.avail_in)
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 (inflate(&x30_zstrm, Z_NO_FLUSH) != Z_OK)
break;
}
inflate(&x30_zstrm, Z_NO_FLUSH);
return x30_zstrm.total_out;
}