Fix broken importer and add some review findings2

This commit is contained in:
Kim Kulling
2022-02-13 18:44:22 +01:00
parent 3e09d462fa
commit 52b6c4f7c0
6 changed files with 21 additions and 16 deletions

View File

@@ -132,7 +132,7 @@ void XGLImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
Compression compression;
size_t total = 0l;
if (compression.open(Compression::Format::Binary, Compression::FlushMode::NoFlush)) {
if (compression.open(Compression::Format::Binary, Compression::FlushMode::NoFlush, -MAX_WBITS)) {
// skip two extra bytes, zgl files do carry a crc16 upfront (I think)
raw_reader->IncPtr(2);
total = compression.decompress((unsigned char *)raw_reader->GetPtr(), raw_reader->GetRemainingSize(), uncompressed);