xkb: fix virtual modmap size computation
Compute virtual modmap size bounded by nVModMapKeys-1, rather than nVModMapKeys. This is sort of a best guess. The other way seems a little more logical, but also leads to segfaults pretty quickly if you hammer GetMap hard enough. So let's try this one.
This commit is contained in:
parent
a484ba1527
commit
6dd4fc4652
|
@ -1325,7 +1325,7 @@ unsigned short * pMap;
|
|||
|
||||
wire= (xkbVModMapWireDesc *)buf;
|
||||
pMap= &xkb->server->vmodmap[rep->firstVModMapKey];
|
||||
for (i=0;i<rep->nVModMapKeys;i++,pMap++) {
|
||||
for (i=0;i<rep->nVModMapKeys-1;i++,pMap++) {
|
||||
if (*pMap!=0) {
|
||||
wire->key= i+rep->firstVModMapKey;
|
||||
wire->vmods= *pMap;
|
||||
|
|
Loading…
Reference in New Issue
Block a user