diff --git a/soh/soh/Extractor/Extract.cpp b/soh/soh/Extractor/Extract.cpp index a9ddc4f41..f8eed8579 100644 --- a/soh/soh/Extractor/Extract.cpp +++ b/soh/soh/Extractor/Extract.cpp @@ -222,9 +222,9 @@ void Extractor::GetRoms(std::vector& roms) { if (S_ISREG(path.st_mode)) { // Get the position of the extension character. - char* ext = strchr(dir->d_name, '.'); - if (ext != NULL && (strcmp(ext, ".z64") == 0) && (strcmp(ext, ".n64") == 0) && - (strcmp(ext, ".v64") == 0)) { + char* ext = strrchr(dir->d_name, '.'); + if (ext != NULL && (strcmp(ext, ".z64") == 0 || strcmp(ext, ".n64") == 0 || + strcmp(ext, ".v64") == 0)) { roms.push_back(dir->d_name); } }