summaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
Diffstat (limited to 'libpcsxcore')
-rwxr-xr-xlibpcsxcore/cdriso.c4
1 files changed, 4 insertions, 0 deletions
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)) {