git-svn-id: http://svn.purei.org/purei/trunk@321 b36208d7-6611-0410-8bec-b1987f11c4a2

This commit is contained in:
jpd002 2008-05-16 21:32:21 +00:00
parent cef8504b7f
commit 389ec6f042
11 changed files with 441 additions and 43 deletions

View file

@ -203,7 +203,10 @@ void CMemoryMap_LSBF::SetHalf(uint32 nAddress, uint16 nValue)
switch(e->nType)
{
case MEMORYMAP_TYPE_MEMORY:
*(uint16*)&((uint8*)e->pPointer)[nAddress - e->nStart] = nValue;
*reinterpret_cast<uint16*>(&reinterpret_cast<uint8*>(e->pPointer)[nAddress - e->nStart]) = nValue;
break;
case MEMORYMAP_TYPE_FUNCTION:
e->handler(nAddress, nValue);
break;
default:
assert(0);