summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dix/registry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dix/registry.c b/dix/registry.c
index 48e1b5dae..1cf7fa59e 100644
--- a/dix/registry.c
+++ b/dix/registry.c
@@ -134,6 +134,7 @@ LookupRequestName(int major, int minor)
const char *
LookupEventName(int event)
{
+ event &= 127;
if (event >= nevent)
return XREGISTRY_UNKNOWN;
@@ -153,7 +154,6 @@ const char *
LookupResourceName(RESTYPE resource)
{
resource &= TypeMask;
-
if (resource >= nresource)
return XREGISTRY_UNKNOWN;