Fix for big endian systems.
This commit is contained in:
parent
e6ad57be22
commit
d67d0b7714
|
@ -34,7 +34,7 @@ static INLINE u8 T1ReadByte(u8 * mem, u32 addr)
|
|||
static INLINE u16 T1ReadWord(void * mem, u32 addr)
|
||||
{
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
return (mem[addr + 1] << 8) | mem[addr];
|
||||
return (((u8*)mem)[addr + 1] << 8) | ((u8*)mem)[addr];
|
||||
#else
|
||||
return *((u16 *) ((u8*)mem + addr));
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue