File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,8 @@ void FPakEntry::DecodeFrom(const uint8* Data)
171
171
Data += sizeof (uint32);
172
172
173
173
// CompressionBlockSize
174
- if ((Bitfield & 0x3f ) == 0x3f )
174
+ bool bLegacyCompressionBlockSize = ((Bitfield & 0x3f ) != 0x3f );
175
+ if (!bLegacyCompressionBlockSize)
175
176
{
176
177
// UE4.27+
177
178
CompressionBlockSize = *(uint32*)Data;
@@ -249,6 +250,12 @@ void FPakEntry::DecodeFrom(const uint8* Data)
249
250
// Adjust CompressionBlockSize for small blocks
250
251
if (UncompressedSize < CompressionBlockSize)
251
252
{
253
+ // UE4.27+ code
254
+ CompressionBlockSize = UncompressedSize;
255
+ }
256
+ else if (bLegacyCompressionBlockSize && UncompressedSize < 65536 )
257
+ {
258
+ // UE4.26 code
252
259
CompressionBlockSize = UncompressedSize;
253
260
}
254
261
You can’t perform that action at this time.
0 commit comments