diff options
| author | SND\notaz_cp <SND\notaz_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-01-21 18:02:02 +0000 |
|---|---|---|
| committer | SND\notaz_cp <SND\notaz_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-01-21 18:02:02 +0000 |
| commit | 77bfa18f8098c3722ea3a4e883a7dc4d0f7ebb4c (patch) | |
| tree | c1f61fe9949ee0d2ab1faefb551bb352b7f38257 /libpcsxcore/cdriso.c | |
| parent | 63584f26fd63fc7ebdbfade15bf2961077c2dc17 (diff) | |
cdriso: fix path handling bug
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@82425 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore/cdriso.c')
| -rwxr-xr-x | libpcsxcore/cdriso.c | 8 |
1 files changed, 5 insertions, 3 deletions
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; |
