X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fcdriso.c;fp=libpcsxcore%2Fcdriso.c;h=f7359ce94136f0918736c9fa070287eeeaf1535b;hp=9ca41726572711a38b4f65582c24207d78c09ba0;hb=4295c49158ad9ce6a20235d5ea5d45139ff63fe9;hpb=7e443736093de5288ad616be550b47e0072674d2 diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 9ca41726..f7359ce9 100644 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -329,8 +329,8 @@ static int parsetoc(const char *isofile) { } // check if it's really a TOC named as a .cue fgets(linebuf, sizeof(linebuf), fi); - token = strtok(tmp, " "); - if (strncmp(token, "CD", 2) != 0 && strcmp(token, "CATALOG") != 0) { + token = strtok(linebuf, " "); + if (token && strncmp(token, "CD", 2) != 0 && strcmp(token, "CATALOG") != 0) { fclose(fi); return -1; }