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>
This commit is contained in:
Matthieu Herrb 2011-04-01 22:54:54 +02:00
parent a074e6b675
commit 552c78592c

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;