Skip to content

Commit

Permalink
MORTEVIELLE: Add extra parenthesis to defines for operation safety
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster authored and Strangerke committed Apr 6, 2012
1 parent 9030ff1 commit 26c8f5d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions engines/mortevielle/var_mor.h
Expand Up @@ -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 ----------------------------------*/
Expand Down

0 comments on commit 26c8f5d

Please sign in to comment.