From 31e935d831c72f3e7a473e1cdbc807ad10656a79 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 18 May 2024 01:35:50 +1000 Subject: [PATCH] GzippedFileReader: Don't clamp chunkID on read --- pcsx2/CDVD/GzippedFileReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcsx2/CDVD/GzippedFileReader.cpp b/pcsx2/CDVD/GzippedFileReader.cpp index 224c1c7e5a69c..8791d2a69db55 100644 --- a/pcsx2/CDVD/GzippedFileReader.cpp +++ b/pcsx2/CDVD/GzippedFileReader.cpp @@ -232,7 +232,7 @@ ThreadedFileReader::Chunk GzippedFileReader::ChunkForOffset(u64 offset) int GzippedFileReader::ReadChunk(void* dst, s64 chunkID) { - if (chunkID < 0 || chunkID >= m_index->size) + if (chunkID < 0) return -1; const s64 file_offset = chunkID * m_index->span;