diff options
author | Alexandre Julliard <julliard@winehq.org> | 2011-04-12 22:39:25 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-04-14 12:34:31 +1000 |
commit | b1149ab782619eaeadf70affd94239184e082d03 (patch) | |
tree | 73cb8bf0735bf24ca39af97104a6d914e179c5e8 /XI2.h | |
parent | ab930a51047f48c7befd4316a9b116f37075697f (diff) |
XI2.h: Fix off-by-one error in the XIMaskLen definition.
The previous definition would give the wrong result for events that are
a multiple of 8.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'XI2.h')
-rw-r--r-- | XI2.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |