diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-09-02 08:57:40 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-09-03 08:39:27 +1000 |
commit | b41db8fe460fc0956922b79261752d1bb104684f (patch) | |
tree | 9890c323c5399bc7c2878cd741001d0841ff28c4 /test | |
parent | 727de7c90de4198222e0dc58d7503b4a1672f642 (diff) |
Xi: fix broken swap code in XISelectEvents request processing.
The pointer advanced 12 bytes too short. Rather unfortunate if both the code
and the test have the same bug.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test')
-rw-r--r-- | test/xi2/protocol-xiselectevents.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c index ac38c53c9..9782cff5c 100644 --- a/test/xi2/protocol-xiselectevents.c +++ b/test/xi2/protocol-xiselectevents.c @@ -113,7 +113,7 @@ static void request_XISelectEvent(xXISelectEventsReq *req, int error) mask = (xXIEventMask*)&req[1]; for (i = 0; i < req->num_masks; i++) { - next = (xXIEventMask*)((char*)mask) + mask->mask_len; + next = (xXIEventMask*)((char*)&mask[1] + mask->mask_len * 4); swaps(&mask->deviceid, n); swaps(&mask->mask_len, n); mask = next; |