From 77bfa18f8098c3722ea3a4e883a7dc4d0f7ebb4c Mon Sep 17 00:00:00 2001 From: "SND\\notaz_cp" Date: Mon, 21 Jan 2013 18:02:02 +0000 Subject: cdriso: fix path handling bug git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@82425 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- libpcsxcore/cdriso.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libpcsxcore') diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 439ef927..f61b353d 100755 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -320,10 +320,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; -- cgit v1.2.3