diff options
Diffstat (limited to 'src/xkb/XKBGetMap.c')
-rw-r--r-- | src/xkb/XKBGetMap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c index 8975ba3..e0fe10e 100644 --- a/src/xkb/XKBGetMap.c +++ b/src/xkb/XKBGetMap.c @@ -25,6 +25,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/X11/XKBGetMap.c,v 1.7 2003/02/04 03:49:33 dawes Exp $ */ + #define NEED_REPLIES #define NEED_EVENTS #define NEED_MAP_READERS @@ -467,8 +469,10 @@ XkbServerMapPtr srv; } else { srv= xkb->server; - bzero((char *)&srv->vmodmap[rep->firstVModMapKey], - rep->nVModMapKeys*sizeof(unsigned short)); + if (rep->nVModMapKeys > rep->firstVModMapKey) + bzero((char *)&srv->vmodmap[rep->firstVModMapKey], + (rep->nVModMapKeys - rep->firstVModMapKey) * + sizeof(unsigned short)); } srv= xkb->server; i= rep->totalVModMapKeys*SIZEOF(xkbVModMapWireDesc); @@ -970,6 +974,7 @@ XkbGetMapChanges(dpy,xkb,changes) UnlockDisplay(dpy); return status; } + UnlockDisplay(dpy); return Success; } |