CPU: Fix incorrect writing of unaligned words via cheats

This commit is contained in:
Stenzek 2023-10-11 01:10:31 +10:00
parent 1d2cf727e4
commit f9d8a49324
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -2897,7 +2897,7 @@ bool CPU::SafeWriteMemoryWord(VirtualMemoryAddress addr, u32 value)
if ((addr & 3) == 0)
return DoSafeMemoryAccess<MemoryAccessType::Write, MemoryAccessSize::Word>(addr, value);
return SafeWriteMemoryHalfWord(addr, Truncate16(value >> 16)) &&
return SafeWriteMemoryHalfWord(addr, Truncate16(value)) &&
SafeWriteMemoryHalfWord(addr + 2, Truncate16(value >> 16));
}