Xext: fix test on extension number for the swapped case.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 552c78592c)
This commit is contained in:
Matthieu Herrb 2011-04-01 22:54:54 +02:00 committed by Peter Hutterer
parent e08a7df54d
commit 2f12adb2c9

View file

@ -185,7 +185,7 @@ SGEGenericEvent(xEvent* from, xEvent* to)
xGenericEvent* gefrom = (xGenericEvent*)from;
xGenericEvent* geto = (xGenericEvent*)to;
if (gefrom->extension > MAXEXTENSIONS)
if ((gefrom->extension & 0x7f) > MAXEXTENSIONS)
{
ErrorF("GE: Invalid extension offset for event.\n");
return;