From 3576a692f6b98dbd4097e971f8262c708063bcd5 Mon Sep 17 00:00:00 2001 From: "SND\\edgbla_cp" Date: Fri, 30 May 2014 02:51:53 +0000 Subject: cdriso: cbn/cbin detection fix; git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@90558 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- libpcsxcore/cdriso.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 0acd2824..a509906a 100755 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -857,6 +857,8 @@ static int handlepbp(const char *isofile) { ext = isofile + strlen(isofile) - 4; if (ext == NULL || (strcmp(ext, ".pbp") != 0 && strcmp(ext, ".PBP") != 0)) return -1; + + fseek(cdHandle, 0, SEEK_SET); numtracks = 0; @@ -1020,6 +1022,8 @@ static int handlecbin(const char *isofile) { ext = isofile + strlen(isofile) - 5; if (ext == NULL || (strcasecmp(ext + 1, ".cbn") != 0 && strcasecmp(ext, ".cbin") != 0)) return -1; + + fseek(cdHandle, 0, SEEK_SET); ret = fread(&ciso_hdr, 1, sizeof(ciso_hdr), cdHandle); if (ret != sizeof(ciso_hdr)) { -- cgit v1.2.3