Skip to content

Commit 8ed7324

Browse files
committed
CORE: Reverted zlib changes for now since it broke 64bit.
1 parent db9019f commit 8ed7324

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

decompress.dat

0 Bytes
Binary file not shown.

src/common/zlib.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,23 @@ int32 zlib_init()
1818
fread(zlib_compress_table, sizeof(uint32), 512, fp);
1919
fclose(fp);
2020

21+
uint32 temp_decompress_table[2556];
2122
fp = fopen("decompress.dat", "rb");
2223
if (fp == NULL)
2324
ShowFatalError("zlib_init: can't open file <decompress.dat> \n");
2425
fseek(fp, 0, SEEK_END);
2526
auto size = ftell(fp);
2627
fseek(fp, 0, SEEK_SET);
27-
fread(&zlib_decompress_table, 1, size, fp);
28+
fread(temp_decompress_table, sizeof(char), size, fp);
2829
fclose(fp);
2930

3031
// Align the jump table with our internal table..
31-
for (auto x = 0; x < (size / 4); x++)
32+
for (auto x = 0; x < size / 4; x++)
3233
{
33-
// Skip value column entries or null jumps..
34-
if ((x % 5) == 4 || zlib_decompress_table[x] == 0)
35-
continue;
36-
zlib_decompress_table[x] = (uintptr)((uintptr*)zlib_decompress_table + (zlib_decompress_table[x] / 4));
34+
if (temp_decompress_table[x] > 0xff)
35+
zlib_decompress_table[x] = (uintptr)((uintptr*)zlib_decompress_table + ((temp_decompress_table[x] - 0x15b3aaa0) / 4));
36+
else
37+
zlib_decompress_table[x] = temp_decompress_table[x];
3738
}
3839

3940
return 0;

0 commit comments

Comments
 (0)