Commit 37b8d688 authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Ulrich Sibiller

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: 's avatarHarms <wharms@bfs,de> Reviewed-by: 's avatarMatthieu Herrb <matthieu@herrb.eu> Signed-off-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent aa7053b3
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment