ChdFileReader: Correct extension check

This commit is contained in:
TheLastRar 2024-12-09 21:59:23 +00:00 committed by Ty
parent a60489b6fd
commit 65748351c7
1 changed files with 1 additions and 1 deletions

View File

@ -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.