From d3794b4d0229f7701d49b81d805840710b455722 Mon Sep 17 00:00:00 2001 From: Date: Mon, 11 Apr 2016 21:20:08 -0400 Subject: [PATCH] fixed undefined type error in flash pre-buffer aliasing --- Source/Project64-core/N64System/Mips/FlashRam.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Project64-core/N64System/Mips/FlashRam.cpp b/Source/Project64-core/N64System/Mips/FlashRam.cpp index fd6c2b3ee..1231fa7f9 100644 --- a/Source/Project64-core/N64System/Mips/FlashRam.cpp +++ b/Source/Project64-core/N64System/Mips/FlashRam.cpp @@ -175,10 +175,10 @@ void CFlashram::WriteToFlashCommand(uint32_t FlashRAM_Command) uint8_t * FlashRamPointer = m_FlashRamPointer; memset(FlipBuffer, 0, sizeof(FlipBuffer)); - for (edx = 0; edx < 128; edx += 4) + for (edx = 0; edx < 128; edx += 1) { - *(unsigned __int32 *)(FlipBuffer + edx) = *(unsigned __int32 *)&FlashRamPointer[edx]; - } + FlipBuffer[edx] = FlashRamPointer[edx ^ 0]; + } /* To do: Have controllable XOR mask to correct flash RAM. */ m_File.Seek(m_FlashRAM_Offset, CFile::begin); m_File.Write(FlipBuffer, 128);