mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 17:32:19 -05:00
fix search rom extension oversight (#2891)
Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
This commit is contained in:
parent
b361d5ede1
commit
30cc61abce
@ -222,9 +222,9 @@ void Extractor::GetRoms(std::vector<std::string>& roms) {
|
|||||||
if (S_ISREG(path.st_mode)) {
|
if (S_ISREG(path.st_mode)) {
|
||||||
|
|
||||||
// Get the position of the extension character.
|
// Get the position of the extension character.
|
||||||
char* ext = strchr(dir->d_name, '.');
|
char* ext = strrchr(dir->d_name, '.');
|
||||||
if (ext != NULL && (strcmp(ext, ".z64") == 0) && (strcmp(ext, ".n64") == 0) &&
|
if (ext != NULL && (strcmp(ext, ".z64") == 0 || strcmp(ext, ".n64") == 0 ||
|
||||||
(strcmp(ext, ".v64") == 0)) {
|
strcmp(ext, ".v64") == 0)) {
|
||||||
roms.push_back(dir->d_name);
|
roms.push_back(dir->d_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user