aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/cdriso.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpcsxcore/cdriso.c')
-rw-r--r--libpcsxcore/cdriso.c4
1 files 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;
}