mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 15:45:42 +00:00
CPU: Fix incorrect writing of unaligned words via cheats
This commit is contained in:
parent
1d2cf727e4
commit
f9d8a49324
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue