RiivolutionPatcher: Ignore last two bits of offset in file patches to match console behavior.

This commit is contained in:
Admiral H. Curtiss 2021-09-29 07:49:32 +02:00
parent 6ec4af7ea4
commit 588c31acb6
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
1 changed files with 2 additions and 1 deletions

View File

@ -298,7 +298,8 @@ static void ApplyPatchToFile(const Patch& patch, DiscIO::FSTBuilderNode* file_no
static void ApplyPatchToFile(const Patch& patch, const File& file_patch,
DiscIO::FSTBuilderNode* file_node)
{
ApplyPatchToFile(patch, file_node, file_patch.m_external, file_patch.m_offset,
// The last two bits of the offset seem to be ignored by actual Riivolution.
ApplyPatchToFile(patch, file_node, file_patch.m_external, file_patch.m_offset & ~u64(3),
file_patch.m_fileoffset, file_patch.m_length, file_patch.m_resize);
}