X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fcdriso.c;fp=libpcsxcore%2Fcdriso.c;h=21203da8d1ec3ef5ee1ff21c9c27f3b73eb1e439;hp=90c9d856fc3f2c067b8035b866616b4e5d68df48;hb=22bbabf6807d704b1a8c9231d55f139e3e00b8dd;hpb=deebc67fc5c5027248842562e02d71d5f683a1e2 diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 90c9d856..21203da8 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;