TotalWar-Modding / tw_pack_lib

1 stars 0 forks source link

PFH4 Encrypted PackedFiles data is not padded. #4

Closed Frodo45127 closed 6 years ago

Frodo45127 commented 6 years ago

The current logic for decrypting PackedFile's data is valid for PFH5 PackFiles, but in PFH4 PackFiles it doesn't work, as they are not padded and the extraction crashes. Tested with Rome 2 music PackFiles. For now, RPFM has a workaround using the old decrypt function that doesn't take padding into account for those PackedFiles, but that's something that needs to be fixed here.

Trolldemorted commented 6 years ago

Does it always crash for you, and which version are you on? I tested it right now with 0.1.18 and rome2's music.pack, and it didn't crash so far.

Frodo45127 commented 6 years ago

nvm, turns out the function I have in RPFM for decrypting wasn't up to date and crashed in a assert. Using the last one from here seems to work.