DiscIO: Fix reading certain WIA chunks with many exceptions

The loop in WIARVZFileReader::Chunk::Read could terminate
prematurely if the size argument was smaller than the size
of an exception list which had only been partially loaded.
This commit is contained in:
JosJuice
2021-03-05 23:48:58 +01:00
parent de30559862
commit 14bfc0be78
2 changed files with 13 additions and 5 deletions

View File

@ -202,6 +202,8 @@ private:
bool HandleExceptions(const u8* data, size_t bytes_allocated, size_t bytes_written,
size_t* bytes_used, bool align);
size_t GetOutBytesWrittenExcludingExceptions() const;
DecompressionBuffer m_in;
DecompressionBuffer m_out;
size_t m_in_bytes_read = 0;