From f03c6a5c61ae98e99824fd389dbb378ca9661e2f Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Sat, 26 Feb 2011 16:25:37 +1030 Subject: [PATCH] Cast to WORD (not sure it's necessary) and put braces around the arguments. --- include/fx2macros.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fx2macros.h b/include/fx2macros.h index af749e2..f59139c 100644 --- a/include/fx2macros.h +++ b/include/fx2macros.h @@ -24,8 +24,8 @@ #include "fx2regs.h" #include "fx2types.h" -#define MSB(addr) (BYTE)((addr >> 8) & 0xff) -#define LSB(addr) (BYTE)(addr & 0xff) +#define MSB(addr) (BYTE)(((WORD)(addr) >> 8) & 0xff) +#define LSB(addr) (BYTE)((WORD)(addr) & 0xff) #define MAKEWORD(msb,lsb) (((WORD)msb << 8) | lsb) #define MSW(dword) (WORD)((dword >> 16) & 0xffff) -- 2.11.4.GIT