aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/cdriso.c
diff options
context:
space:
mode:
authornotaz2013-05-26 16:25:24 +0300
committernotaz2013-05-26 16:25:24 +0300
commit4295c49158ad9ce6a20235d5ea5d45139ff63fe9 (patch)
tree6e791f822cf95d5dcb16ff8262cbd603d9dda989 /libpcsxcore/cdriso.c
parent7e443736093de5288ad616be550b47e0072674d2 (diff)
downloadpcsx_rearmed-4295c49158ad9ce6a20235d5ea5d45139ff63fe9.tar.gz
pcsx_rearmed-4295c49158ad9ce6a20235d5ea5d45139ff63fe9.tar.bz2
pcsx_rearmed-4295c49158ad9ce6a20235d5ea5d45139ff63fe9.zip
cdriso: use correct buffer in .toc check
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;
}