mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-07 05:20:41 +02:00
xkb: Fix key type without level names in XkbCopyKeymap
A key type that has no level names is legit. Before this commit, `XkbCopyKeymap` would make such level inconsistent by setting its number of levels to 0 while keeping its map entries. It suffices to clear the names array. Fixed by copying the level count from the source type. WARNING: this will trigger an error in `XkbGetNames`, which worked before this commit only by chance. This is fixed in the next commit.
This commit is contained in:
parent
6f31791945
commit
9ddaf5b1ee
1 changed files with 1 additions and 1 deletions
|
|
@ -1044,7 +1044,7 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst)
|
|||
if (dtype->num_levels && dtype->level_names &&
|
||||
i < dst->map->num_types)
|
||||
free(dtype->level_names);
|
||||
dtype->num_levels = 0;
|
||||
dtype->num_levels = stype->num_levels;
|
||||
dtype->level_names = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue