Skip to content

Commit 5e1f16c

Browse files
committed
Oodle: improved detection
1 parent 5df4a52 commit 5e1f16c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Unreal/UnCoreCompression.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ int appDecompress(byte *CompressedBuffer, int CompressedSize, byte *Uncompressed
250250
{
251251
Flags = COMPRESS_ZLIB;
252252
}
253-
else if (b1 == 0x8C && (b2 == 5 || b2 == 6 || b2 == 10 || b2 == 11 || b2 == 12))
253+
else if ((b1 == 0x8C || b1 == 0xCC) && (b2 == 5 || b2 == 6 || b2 == 10 || b2 == 11 || b2 == 12))
254254
{
255255
Flags = COMPRESS_OODLE;
256256
}
@@ -338,7 +338,7 @@ int appDecompress(byte *CompressedBuffer, int CompressedSize, byte *Uncompressed
338338
int Kraken_Decompress(const byte *src, size_t src_len, byte *dst, size_t dst_len);
339339
int newLen = Kraken_Decompress(CompressedBuffer, CompressedSize, UncompressedBuffer, UncompressedSize);
340340
if (newLen <= 0)
341-
appError("Kraken_Decompress returned %d\n", newLen);
341+
appError("Kraken_Decompress returned %d (magic=%02X/%02X)\n", newLen, CompressedBuffer[0], CompressedBuffer[1]);
342342
if (newLen != UncompressedSize) appError("oodle len mismatch: %d != %d", newLen, UncompressedSize);
343343
return newLen;
344344
#else

0 commit comments

Comments
 (0)