35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
From 6484236cb0281e8040ff6c8078c87899a3407534 Mon Sep 17 00:00:00 2001
|
|
From: edgbla <edgbla@yandex.ru>
|
|
Date: Sun, 19 Feb 2017 00:40:07 +0300
|
|
Subject: [PATCH] cdriso uncompress2 fix (mgorny);
|
|
|
|
---
|
|
pcsxr/libpcsxcore/cdriso.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/pcsxr/libpcsxcore/cdriso.c b/pcsxr/libpcsxcore/cdriso.c
|
|
index 318f5ea7..4d6c3370 100644
|
|
--- a/libpcsxcore/cdriso.c
|
|
+++ b/libpcsxcore/cdriso.c
|
|
@@ -1219,7 +1219,7 @@ static int cdread_sub_mixed(FILE *f, unsigned int base, void *dest, int sector)
|
|
return ret;
|
|
}
|
|
|
|
-static int uncompress2(void *out, unsigned long *out_size, void *in, unsigned long in_size)
|
|
+static int uncompress2_internal(void *out, unsigned long *out_size, void *in, unsigned long in_size)
|
|
{
|
|
static z_stream z;
|
|
int ret = 0;
|
|
@@ -1298,7 +1298,7 @@ static int cdread_compressed(FILE *f, unsigned int base, void *dest, int sector)
|
|
if (is_compressed) {
|
|
cdbuffer_size_expect = sizeof(compr_img->buff_raw[0]) << compr_img->block_shift;
|
|
cdbuffer_size = cdbuffer_size_expect;
|
|
- ret = uncompress2(compr_img->buff_raw[0], &cdbuffer_size, compr_img->buff_compressed, size);
|
|
+ ret = uncompress2_internal(compr_img->buff_raw[0], &cdbuffer_size, compr_img->buff_compressed, size);
|
|
if (ret != 0) {
|
|
SysPrintf("uncompress failed with %d for block %d, sector %d\n",
|
|
ret, block, sector);
|
|
--
|
|
2.15.1
|
|
|