mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-02-07 05:44:39 +00:00
Dark Messiah of Might and Magic GCF extraction fails due to the next index being one past the final entry index #16
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HeroponRikiBestest on GitHub (Nov 30, 2025).
Seems to impact most if not all of the GCF files, in all releases of Dark Messiah of Might and Magic on redump. For this output, I'm using
mm_engine_pub.gcfsince it's one of the smallest ones and should be present on every release.When running get_files for the GCFs, the wrapper enters this loop
4b39ee8d00/SabreTools.Serialization/Wrappers/GCF.cs (L95)with a valid starting index. However, after it's been added to the block entries, it tries to get the index of the next block. The index it gets is 22781. The size of Model.BlockEntries for this GCF is 22781, so this will fail with an out of bounds exception. I assume it's not coincidence that it just happens to be the exact size of the array, but I don't know enough about GCFs to say why.
Console output: