summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2018-01-04 20:07:21 -0800
committerMarcus Huderle <huderlem@gmail.com>2018-01-04 20:07:21 -0800
commit00d49feee5c005750185d836033fc33a220a09f5 (patch)
treec70c9c4e5cd285daa5415698c77dfcc4c5bf1c90
parentf0097860b0098ae465204152fb3a38d69422b27e (diff)
Wrap compare macro's args in parentheses
-rw-r--r--asm/macros/event.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/asm/macros/event.inc b/asm/macros/event.inc
index 3b40883dc..cf4c9628a 100644
--- a/asm/macros/event.inc
+++ b/asm/macros/event.inc
@@ -229,10 +229,10 @@
@ Generic compare macro which attempts to deduce argument types based on their values
@ Any values between 0x4000 to 0x4FFF and 0x8000 to 0x8FFF are considered event variable identifiers
.macro compare arg1, arg2
- .if ((\arg1 >> 12) == 4 || (\arg1 >> 12) == 8) && ((\arg2 >> 12) == 4 || (\arg2 >> 12) == 8)
- compare_var_to_var \arg1, \arg2
- .elseif ((\arg1 >> 12) == 4 || (\arg1 >> 12) == 8) && (\arg2 >= -0xFFFF && \arg2 <= 0xFFFF)
- compare_var_to_value \arg1, (\arg2 & 0xFFFF)
+ .if (((\arg1) >> 12) == 4 || ((\arg1) >> 12) == 8) && (((\arg2) >> 12) == 4 || ((\arg2) >> 12) == 8)
+ compare_var_to_var (\arg1), (\arg2)
+ .elseif (((\arg1) >> 12) == 4 || ((\arg1) >> 12) == 8) && ((\arg2) >= -0xFFFF && (\arg2) <= 0xFFFF)
+ compare_var_to_value (\arg1), ((\arg2) & 0xFFFF)
.else
.error "Invalid arguments for 'compare'"
.endif