summaryrefslogtreecommitdiff
path: root/asm/macros/event.inc
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2018-01-04 15:24:19 -0800
committerMarcus Huderle <huderlem@gmail.com>2018-01-04 15:24:19 -0800
commitc748287725a01561ba9f972b094d7b297cea2d8e (patch)
tree886f40554754b1bacd2a9d263aa0c9979de7dd67 /asm/macros/event.inc
parent88c42ade4bfb4a285444c327663e72c7f438adea (diff)
Use -1 instead of 65535 for compare macro
Diffstat (limited to 'asm/macros/event.inc')
-rw-r--r--asm/macros/event.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/asm/macros/event.inc b/asm/macros/event.inc
index 5176beff3..3b40883dc 100644
--- a/asm/macros/event.inc
+++ b/asm/macros/event.inc
@@ -231,8 +231,8 @@
.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 >= 0 && \arg2 <= 0xFFFF)
- compare_var_to_value \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