summaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-01-23 09:37:02 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-01-23 09:37:02 +0000
commitc74ebcc191b3d1d25627f131866648c085028633 (patch)
tree19d2d5ac0753d8bc841dea85393b96358c67e985 /libpcsxcore
parent90c177779d8c8d02a3f8701f8149a3f7d9778a9f (diff)
downloadpcsxr-c74ebcc191b3d1d25627f131866648c085028633.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@40655 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/ppf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libpcsxcore/ppf.c b/libpcsxcore/ppf.c
index 7595a6a1..5e563c19 100644
--- a/libpcsxcore/ppf.c
+++ b/libpcsxcore/ppf.c
@@ -131,7 +131,7 @@ void CheckPPFCache(unsigned char *pB, unsigned char m, unsigned char s, unsigned
}
}
-static void AddToPPF(s32 ladr, s32 pos, s32 anz, s8 *ppfmem) {
+static void AddToPPF(s32 ladr, s32 pos, s32 anz, unsigned char *ppfmem) {
if (!ppfHead) {
ppfHead = (PPF_DATA *)malloc(sizeof(PPF_DATA) + anz);
ppfHead->addr = ladr;
@@ -173,7 +173,8 @@ void BuildPPFCache() {
char buffer[12];
char method, undo = 0, blockcheck = 0;
int dizlen, dizyn;
- unsigned char ppfmem[512], szPPF[MAXPATHLEN];
+ unsigned char ppfmem[512];
+ char szPPF[MAXPATHLEN];
int count, seekpos, pos;
u32 anz; // use 32-bit to avoid stupid overflows
s32 ladr, off, anx;
@@ -300,7 +301,7 @@ void BuildPPFCache() {
if (off + anz > CD_FRAMESIZE_RAW) {
anx = off + anz - CD_FRAMESIZE_RAW;
anz -= (unsigned char)anx;
- AddToPPF(ladr + 1, 0, anx, ppfmem + anz);
+ AddToPPF(ladr + 1, 0, anx, &ppfmem[anz]);
}
AddToPPF(ladr, off, anz, ppfmem); // add to link list