summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-10-16 00:22:00 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-10-16 00:22:00 +0300
commit6dd4fc4652f942724039dc2317c560ea7276ab59 (patch)
tree7145eccef431c7df0d1d002f8211d534f040b46e /xkb
parenta484ba15277e66e7ef9b21b238dcbf760695bc63 (diff)
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.
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xkb/xkb.c b/xkb/xkb.c
index ba8fc7fbc..bceaf49ff 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -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;