Don't write to EXRAM if it doesn't exist.

Previously, if a gamecube game wrote to an EXRAM address, dolphin would
segfault.
This commit is contained in:
Scott Mansell 2014-09-06 17:42:31 +12:00
parent 387e1e3f21
commit 96e92d33b7

View File

@ -186,9 +186,9 @@ inline void WriteToHardware(u32 em_address, const T data, u32 effective_address,
*(T*)&m_pRAM[em_address & RAM_MASK] = bswap(data);
return;
}
else if (((em_address & 0xF0000000) == 0x90000000) ||
else if (m_pEXRAM && (((em_address & 0xF0000000) == 0x90000000) ||
((em_address & 0xF0000000) == 0xD0000000) ||
((em_address & 0xF0000000) == 0x10000000))
((em_address & 0xF0000000) == 0x10000000)))
{
*(T*)&m_pEXRAM[em_address & EXRAM_MASK] = bswap(data);
return;