From f07885b33e56b6d19207e22878b66baa8030999f Mon Sep 17 00:00:00 2001 From: thoduv Date: Tue, 4 Jul 2006 21:48:58 +0000 Subject: [PATCH] Endianess conversion macros --- desmume/src/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desmume/src/types.h b/desmume/src/types.h index 8c92945ea..14848e8fb 100644 --- a/desmume/src/types.h +++ b/desmume/src/types.h @@ -96,9 +96,9 @@ typedef int BOOL; /* little endian (ds' endianess) to local endianess convert macros */ #ifdef LOCAL_BE /* local arch is big endian */ -# define LE_TO_LOCAL_16(x) ((((x)&0xff)<<8)|((()x>>8)&0xff)) +# define LE_TO_LOCAL_16(x) ((((x)&0xff)<<8)|(((x)>>8)&0xff)) # define LE_TO_LOCAL_32(x) ((((x)&0xff)<<24)|(((x)&0xff00)<<8)|(((x)>>8)&0xff00)|(((x)>>24)&0xff)) -# define LOCAL_TO_LE_16(x) ((((x)&0xff)<<8)|((()x>>8)&0xff)) +# define LOCAL_TO_LE_16(x) ((((x)&0xff)<<8)|(((x)>>8)&0xff)) # define LOCAL_TO_LE_32(x) ((((x)&0xff)<<24)|(((x)&0xff00)<<8)|(((x)>>8)&0xff00)|(((x)>>24)&0xff)) #else /* local arch is little endian */ # define LE_TO_LOCAL_16(x) (x)