xkb: don't overrun the map index when accessing symbols.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-03-13 12:43:17 +10:00
parent 497a125339
commit 836864b657

View File

@ -232,7 +232,7 @@ XkbMapChangesPtr mc;
mc= (changes?(&changes->map):NULL);
syms= &pCore->map[(first-xkb->min_key_code)*pCore->mapWidth];
syms= &pCore->map[(first - pCore->minKeyCode) * pCore->mapWidth];
for (key=first; key<(first+num); key++,syms+= pCore->mapWidth) {
explicit= xkb->server->explicit[key]&XkbExplicitKeyTypesMask;
types[XkbGroup1Index]= XkbKeyKeyTypeIndex(xkb,key,XkbGroup1Index);