Fix map->num_types check in XkbAddKeyType()

Check is intended to ensure we allocate at least XkbNumRequiredTypes
in map, but was accidentally marked with a ! causing the wrong check.

Reported-by: Harms <wharms@bfs,de>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith 2014-07-06 10:54:57 -07:00
parent ff9a5c1992
commit 1e362fac92

View file

@ -300,7 +300,7 @@ XkbAddKeyType(XkbDescPtr xkb,
}
}
}
if ((!map) || (!map->types) || (!map->num_types < XkbNumRequiredTypes)) {
if ((!map) || (!map->types) || (map->num_types < XkbNumRequiredTypes)) {
tmp = XkbNumRequiredTypes + 1;
if (XkbAllocClientMap(xkb, XkbKeyTypesMask, tmp) != Success)
return NULL;