ref: 159bc5d869346ce3c4f213988e8cceffa47c12fa
parent: a25998f1137bc93599dd5715f71c8b1c63d4dc15
author: Gabriel Ravier <gabravier@gmail.com>
date: Mon Nov 4 06:42:34 EST 2019
Documentation : Make operator priority clearer) Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
--- a/src/Flags.cpp
+++ b/src/Flags.cpp
@@ -6,9 +6,9 @@
// Macros for setting, un-setting and getting flags
// Each flag is stored in a bit, so we can use the exact same macros we'd use for bits
-#define SET_FLAG(x, i) ((x)[(i) / 8] |= 1 << (i) % 8)
-#define UNSET_FLAG(x, i) ((x)[(i) / 8] &= ~(1 << (i) % 8))
-#define GET_FLAG(x, i) ((x)[(i) / 8] & (1 << (i) % 8))
+#define SET_FLAG(x, i) ((x)[(i) / 8] |= 1 << ((i) % 8))
+#define UNSET_FLAG(x, i) ((x)[(i) / 8] &= ~(1 << ((i) % 8)))
+#define GET_FLAG(x, i) ((x)[(i) / 8] & (1 << ((i) % 8)))
unsigned char gFlagNPC[1000];
unsigned char gSkipFlag[8];