From d67d0b77148b6c5b616cb3873a7804528178d04f Mon Sep 17 00:00:00 2001 From: yabause Date: Wed, 29 Apr 2009 20:19:43 +0000 Subject: [PATCH] Fix for big endian systems. --- desmume/src/mem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desmume/src/mem.h b/desmume/src/mem.h index e94f6dfb5..10a01690e 100644 --- a/desmume/src/mem.h +++ b/desmume/src/mem.h @@ -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