From: notaz Date: Sun, 26 May 2013 13:25:24 +0000 (+0300) Subject: cdriso: use correct buffer in .toc check X-Git-Tag: r20~86 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4295c49158ad9ce6a20235d5ea5d45139ff63fe9;p=pcsx_rearmed.git cdriso: use correct buffer in .toc check --- 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; }