From 30cc61abce6def547994f64d6563e096d3de320d Mon Sep 17 00:00:00 2001 From: AltoXorg <56553686+Alto1772@users.noreply.github.com> Date: Thu, 18 May 2023 10:22:57 +0800 Subject: [PATCH] fix search rom extension oversight (#2891) Co-authored-by: Christopher Leggett Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> --- soh/soh/Extractor/Extract.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } }