Sewer56 / FileEmulationFramework

Framework for emulating files using Reloaded-II.
GNU Lesser General Public License v3.0
7 stars 8 forks source link

Fix emulated PAK files missing padding at the end #17

Closed AnimatedSwine37 closed 6 months ago

AnimatedSwine37 commented 6 months ago

Pak files should have an additional empty entry header at the end of them, this adds that.

This was found to cause crashes in P3P, mainly when editing init_free.bin as it is loaded at boot when there is a decent chance the memory after the file is unallocated.

Looking at pak files from P5R and P4G it seems that all versions of the format probably expect this additional header so I've added it for all three. Those games seemingly not crashing may be due to them handling the erroneous file better (just speculation, P3P is the only game I properly looked at).

AnimatedSwine37 commented 6 months ago

I did that as some existing code in PakBuilder did so I assumed it was the way to go. I've updating both the existing and new code like you said.

Sewer56 commented 6 months ago

All sorted, with release out too.