panzi / u4pak

unpack, pack, list, check and mount Unreal Engine 4 .pak archives
506 stars 142 forks source link

Logic error in integrity check regarding compression = NONE #39

Closed khadoran closed 3 years ago

khadoran commented 3 years ago

The check for mismatching compressed/uncompressed size is done when the data actually is compressed (r1.compression_method != COMPR_NONE):

Line 262: if r1.compression_method != COMPR_NONE and r1.compressed_size != r1.uncompressed_size:

this should be: if r1.compression_method == COMPR_NONE ...

panzi commented 3 years ago

You're right! Thank you! :D