Merge pull request #732 from bslenul/crash-fix
authornotaz <notasas@gmail.com>
Mon, 17 Jul 2023 17:06:27 +0000 (20:06 +0300)
committerGitHub <noreply@github.com>
Mon, 17 Jul 2023 17:06:27 +0000 (20:06 +0300)
Fix crash when BIOS isn't found

frontend/libretro.c

index 938b8e5..1fb7c13 100644 (file)
@@ -2819,7 +2819,7 @@ static bool find_any_bios(const char *dirpath, char *path, size_t path_size)
    if (dir == NULL)
       return false;
 
-   for (i = 0; sizeof(substrings) / sizeof(substrings[0]); i++)
+   for (i = 0; i < (sizeof(substrings) / sizeof(substrings[0])); i++)
    {
       const char *substr = substrings[i];
       size_t len = strlen(substr);