1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

Avoid negative array subscript; break out of the loop if that happens.

This commit is contained in:
Pascal Stumpf 2012-11-27 21:12:23 +01:00 committed by Jon Trulson
parent 943aaadf86
commit 0ec1d6b692

View file

@ -894,6 +894,8 @@ GetMetaMask
for (i1 = 0; i1 < modifierMapping->max_keypermod; i1++) {
thisKeyCode = modifierMapping->modifiermap[mapIndex *
modifierMapping->max_keypermod + i1];
if (thisKeyCode < minKeycodes)
break;
thisKeySym = keyboardMapping[(thisKeyCode - minKeycodes) *
keysymsPerKeycode];
if ((thisKeySym == XK_Meta_L) || (thisKeySym == XK_Meta_R)) {