KEMBAR78
GLK: SCOTT: Update UNP64 by angstsmurf · Pull Request #4720 · scummvm/scummvm · GitHub
Skip to content

Conversation

@angstsmurf
Copy link
Contributor

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.cpp and
replacing 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.cpp
in 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.

The UNP64 code was not endian safe, unaligned and contained a couple of
out-of-bounds reads and errors in the translation to C++.

This fixes that, mainly by adding a number of helper functions to
exo_util.cpp and replacing the unsafe code with calls to them.
@dreammaster
Copy link
Member

Thanks for taking care of this. It all looks good, merging.

@dreammaster dreammaster merged commit 3012d2a into scummvm:master Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants