Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates UNP64, the library used by the ScottFree engine to decompress Commodore
64 files.
The UNP64 code was not endian safe, contained many unaligned and a couple of
out-of-bounds reads and errors made in the translation to C++.
This fixes that, mainly by adding a number of helper functions to
exo_util.cppandreplacing the unsafe code with calls to them.
Some of the helper functions might replicate functionality that already exists in
common/endian.h, I haven't really looked into this.It also changes the interface called by the ScottFree engine, removing one
parameter and moving the parsing of "switches" out of
c64_checksums.cppin Scott into
unp64.cpp.There is a small number of other minor fixes and cleanups of the UNP64 code.
I have tested this with all the relevant games I have. No regressions noted.