aboutsummaryrefslogtreecommitdiff
path: root/X11/extensions/XI2.h
diff options
context:
space:
mode:
Diffstat (limited to 'X11/extensions/XI2.h')
-rw-r--r--X11/extensions/XI2.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/X11/extensions/XI2.h b/X11/extensions/XI2.h
index 6ba1377aa..3c39946f5 100644
--- a/X11/extensions/XI2.h
+++ b/X11/extensions/XI2.h
@@ -127,7 +127,7 @@
#define XISetMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] |= (1 << ((event) & 7)))
#define XIClearMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] &= ~(1 << ((event) & 7)))
#define XIMaskIsSet(ptr, event) (((unsigned char*)(ptr))[(event)>>3] & (1 << ((event) & 7)))
-#define XIMaskLen(event) (((event + 7) >> 3))
+#define XIMaskLen(event) (((event) >> 3) + 1)
/* Fake device ID's for event selection */
#define XIAllDevices 0