aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/cdriso.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpcsxcore/cdriso.c')
-rw-r--r--libpcsxcore/cdriso.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c
index 90c9d85..21203da 100644
--- a/libpcsxcore/cdriso.c
+++ b/libpcsxcore/cdriso.c
@@ -470,10 +470,12 @@ static int parsecue(const char *isofile) {
// build a path for files referenced in .cue
strncpy(filepath, cuename, sizeof(filepath));
- tmp = strrchr(filepath, '/') + 1;
- if (tmp == NULL)
- tmp = strrchr(filepath, '\\') + 1;
+ tmp = strrchr(filepath, '/');
if (tmp == NULL)
+ tmp = strrchr(filepath, '\\');
+ if (tmp != NULL)
+ tmp++;
+ else
tmp = filepath;
*tmp = 0;
filepath[sizeof(filepath) - 1] = 0;