test/xi2: Fix mask size in XISelectEvents test

XI2LASTEVENT identifies the bit number, not the mask size in bits. The
mask size in bits is XI2LASTEVENT + 1 and the mask size in bytes is
(XI2LASTEVENT + 8) / 8 or XI2MASKSIZE.
This commit is contained in:
Povilas Kanapickas 2020-10-10 02:51:40 +03:00 committed by Peter Hutterer
parent f5220117e9
commit 07e6935030
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ request_XISelectEvents_masks(xXISelectEventsReq * req)
{
int i, j;
xXIEventMask *mask;
int nmasks = (XI2LASTEVENT + 7) / 8;
int nmasks = XI2MASKSIZE;
unsigned char *bits;
mask = (xXIEventMask *) &req[1];