diff options
author | Paul Gilbert | 2012-01-22 08:25:00 +1100 |
---|---|---|
committer | Strangerke | 2012-04-06 08:20:41 +0200 |
commit | 85b7c1cef73a5a64e99c8e6405c8ccbd7630cf41 (patch) | |
tree | e4d9e24a002c02d485d440e11fac9e2287f529af /engines/mortevielle/var_mor.h | |
parent | 9ae61553d4c5fab40b025824072b250770cb5b2b (diff) | |
download | scummvm-rg350-85b7c1cef73a5a64e99c8e6405c8ccbd7630cf41.tar.gz scummvm-rg350-85b7c1cef73a5a64e99c8e6405c8ccbd7630cf41.tar.bz2 scummvm-rg350-85b7c1cef73a5a64e99c8e6405c8ccbd7630cf41.zip |
MORTEVIELLE: Add extra parenthesis to defines for operation safety
Diffstat (limited to 'engines/mortevielle/var_mor.h')
-rw-r--r-- | engines/mortevielle/var_mor.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/mortevielle/var_mor.h b/engines/mortevielle/var_mor.h index a96329f477..89f05f121e 100644 --- a/engines/mortevielle/var_mor.h +++ b/engines/mortevielle/var_mor.h @@ -61,14 +61,14 @@ namespace Mortevielle { /*------------------------- DEFINES ----------------------------------*/ /*---------------------------------------------------------------------------*/ -#define pred(type, v) (v - 1) -#define succ(type, v) (v + 1) +#define pred(type, v) ((v) - 1) +#define succ(type, v) ((v) + 1) #define ord(v) ((int) v) #define chr(v) ((char) v) -#define lo(v) (v & 0xff) -#define hi(v) ((v >> 8) & 0xff) +#define lo(v) ((v) & 0xff) +#define hi(v) (((v) >> 8) & 0xff) #define swap(v) (((lo(v)) << 8) | ((hi(v)) >> 8)) -#define odd(v) ((v % 2) == 1) +#define odd(v) (((v) % 2) == 1) /*---------------------------------------------------------------------------*/ /*------------------------- CONSTANTS ----------------------------------*/ |