diff options
author | twinaphex | 2014-12-21 23:19:03 +0100 |
---|---|---|
committer | twinaphex | 2014-12-21 23:19:03 +0100 |
commit | e63a9dc66d0ce5a9d88353f880ef88a6590d06fd (patch) | |
tree | 6489b0d548ece33a4e92df40db442d839b934eb2 /libpcsxcore/cdriso.c | |
parent | 247fc699be6b3bd95fd9126541e0804cc8dffdd4 (diff) | |
parent | 5ec7acdfb1bc4c3da372f7f8e1a0a1022becce21 (diff) | |
download | pcsx_rearmed-e63a9dc66d0ce5a9d88353f880ef88a6590d06fd.tar.gz pcsx_rearmed-e63a9dc66d0ce5a9d88353f880ef88a6590d06fd.tar.bz2 pcsx_rearmed-e63a9dc66d0ce5a9d88353f880ef88a6590d06fd.zip |
Merge https://github.com/notaz/pcsx_rearmed
Diffstat (limited to 'libpcsxcore/cdriso.c')
-rw-r--r-- | libpcsxcore/cdriso.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index d6672f9..b733f5b 100644 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -552,9 +552,9 @@ static int parsecue(const char *isofile) { pregapOffset = -1; // mark to fill track start_offset } else if (!strcmp(token, "FILE")) { - t = sscanf(linebuf, " FILE \"%256[^\"]\"", tmpb); + t = sscanf(linebuf, " FILE \"%255[^\"]\"", tmpb); if (t != 1) - sscanf(linebuf, " FILE %256s", tmpb); + sscanf(linebuf, " FILE %255s", tmpb); // absolute path? ti[numtracks + 1].handle = fopen(tmpb, "rb"); @@ -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"); |