aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authornotaz2014-12-21 20:43:23 +0200
committernotaz2014-12-21 20:43:23 +0200
commit9726a4aff95e362af3df014a02185031911bf784 (patch)
treead43a439c83b2aa8a5fb73f1bf35e62c36a72382 /libpcsxcore
parente7e1f57236744efe2e22ab1aa2f10f34787e431a (diff)
downloadpcsx_rearmed-9726a4aff95e362af3df014a02185031911bf784.tar.gz
pcsx_rearmed-9726a4aff95e362af3df014a02185031911bf784.tar.bz2
pcsx_rearmed-9726a4aff95e362af3df014a02185031911bf784.zip
cdriso: merge from pcsxr r90558
Author: edgbla cdriso: cbn/cbin detection fix;
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/cdriso.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c
index d6672f9..2c9e692 100644
--- a/libpcsxcore/cdriso.c
+++ b/libpcsxcore/cdriso.c
@@ -795,6 +795,8 @@ static int handlepbp(const char *isofile) {
if (ext == NULL || (strcmp(ext, ".pbp") != 0 && strcmp(ext, ".PBP") != 0))
return -1;
+ fseek(cdHandle, 0, SEEK_SET);
+
numtracks = 0;
ret = fread(&pbp_hdr, 1, sizeof(pbp_hdr), cdHandle);
@@ -958,6 +960,8 @@ static int handlecbin(const char *isofile) {
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)) {
SysPrintf("failed to read ciso header\n");