Explicitly cast X sequence number
Fix an undefined behavior. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
a6b63cd035
commit
eabe2b5bb8
|
@ -1936,7 +1936,9 @@ ev_handle(session_t *ps, xcb_generic_event_t *ev) {
|
||||||
// proc might also just be Xlib internal event processing functions, and
|
// proc might also just be Xlib internal event processing functions, and
|
||||||
// because they probably won't see all X replies, they will complain about
|
// because they probably won't see all X replies, they will complain about
|
||||||
// missing sequence numbers.
|
// missing sequence numbers.
|
||||||
ev->sequence = LastKnownRequestProcessed(ps->dpy);
|
//
|
||||||
|
// We only need the low 16 bits
|
||||||
|
ev->sequence = (uint16_t)(LastKnownRequestProcessed(ps->dpy) & 0xffff);
|
||||||
proc(ps->dpy, &dummy, (xEvent *)ev);
|
proc(ps->dpy, &dummy, (xEvent *)ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue