From 7567b0a57ad99a9988039f2434e5ec4622f7775b Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Wed, 27 Dec 2023 17:29:35 -0500 Subject: [PATCH] safeguard SQUARE and CUBE macro arguments in parentheses --- src/data/pokemon/experience_tables.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/pokemon/experience_tables.h b/src/data/pokemon/experience_tables.h index 15bcadeb29c3..8f50e1091856 100644 --- a/src/data/pokemon/experience_tables.h +++ b/src/data/pokemon/experience_tables.h @@ -1,5 +1,5 @@ -#define SQUARE(n)(n * n) -#define CUBE(n)(n * n * n) +#define SQUARE(n)((n) * (n)) +#define CUBE(n)((n) * (n) * (n)) #define EXP_SLOW(n)((5 * CUBE(n)) / 4) // (5 * (n)^3) / 4 #define EXP_FAST(n)((4 * CUBE(n)) / 5) // (4 * (n)^3) / 5