X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fmenu.c;h=2823a230d3e07a14976cc2dae9a33b0134ec1c31;hp=156273568f9011ab6e43a71bf1753f26c4a40f3a;hb=271e11499d7e60e1bfb0ffeda8f8266906130b87;hpb=3154bfab51566cbaa5bce3965d4c915bfb1b4f53 diff --git a/frontend/menu.c b/frontend/menu.c index 15627356..2823a230 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -209,6 +209,9 @@ static int optional_cdimg_filter(struct dirent **namelist, int count, struct stat64 statf; FILE *f; + if (count <= 1) + return count; + for (i = 1; i < count; i++) { if (namelist[i] == NULL || namelist[i]->d_type == DT_DIR) continue;