summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-11-02 14:07:19 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-11-29 15:12:28 +1000
commit2aad1a2b42b7def7812abfa2462b6bcc6382e03a (patch)
tree6c842daba74952809976a881201bc9d801fd275b
parentb2015a2c01711646bb7ae23d684abee0cd55d4d0 (diff)
include: fix mask size calculation
Same bug as inputproto-2.0.1-9-gb1149ab, if the XI2LASTEVENT was a multiple of 8, the mask was one bit too short. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--include/inputstr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/inputstr.h b/include/inputstr.h
index 0a2128732..f482a2294 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -72,7 +72,7 @@ extern _X_EXPORT int CountBits(const uint8_t *mask, int len);
* this number here is bumped.
*/
#define XI2LASTEVENT 17 /* XI_RawMotion */
-#define XI2MASKSIZE ((XI2LASTEVENT + 7)/8) /* no of bits for masks */
+#define XI2MASKSIZE ((XI2LASTEVENT >> 3) + 1) /* no of bytes for masks */
/**
* Scroll types for ::SetScrollValuator and the scroll type in the