Fix comparison of bootcore= argument (#993)

This commit is contained in:
Andrea Chiavazza
2025-06-09 18:52:28 +01:00
committed by GitHub
parent f8d5f51c0c
commit d3f6540786

View File

@@ -119,7 +119,6 @@ char* loadLastcore()
char *findCore(const char *name, char *coreName, int indent)
{
char *spl;
DIR *dir;
struct dirent *entry;
@@ -144,16 +143,11 @@ char *findCore(const char *name, char *coreName, int indent)
return indir;
}
}
else {
else if (!strcmp(entry->d_name, coreName))
{
snprintf(path, 256, "%s/%s", name, entry->d_name);
if (strstr(path, coreName) != NULL) {
spl = strrchr(path, '.');
if (spl && (!strcmp(spl, ".rbf") || !strcmp(spl, ".mra") || !strcmp(spl, ".mgl")))
{
closedir(dir);
return path;
}
}
closedir(dir);
return path;
}
}
closedir(dir);