From 4295c49158ad9ce6a20235d5ea5d45139ff63fe9 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 26 May 2013 16:25:24 +0300 Subject: cdriso: use correct buffer in .toc check --- libpcsxcore/cdriso.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 9ca4172..f7359ce 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; } -- cgit v1.2.3