From 65748351c7dc5b7393e753a6882d79357a87748d Mon Sep 17 00:00:00 2001 From: TheLastRar Date: Mon, 9 Dec 2024 21:59:23 +0000 Subject: [PATCH] ChdFileReader: Correct extension check --- pcsx2/CDVD/ChdFileReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcsx2/CDVD/ChdFileReader.cpp b/pcsx2/CDVD/ChdFileReader.cpp index 8cdb7e4193ad0..a58f24590b5b1 100644 --- a/pcsx2/CDVD/ChdFileReader.cpp +++ b/pcsx2/CDVD/ChdFileReader.cpp @@ -105,7 +105,7 @@ static chd_file* OpenCHD(const std::string& filename, FileSystem::ManagedCFilePt parent_dir.c_str(), "*.*", FILESYSTEM_FIND_FILES | FILESYSTEM_FIND_HIDDEN_FILES | FILESYSTEM_FIND_KEEP_ARRAY, &parent_files); for (FILESYSTEM_FIND_DATA& fd : parent_files) { - if (StringUtil::EndsWithNoCase(Path::GetExtension(fd.FileName), ".chd")) + if (!StringUtil::EndsWithNoCase(Path::GetExtension(fd.FileName), "chd")) continue; // Re-check the header, it might have changed since we last opened.