]> Dogcows Code - chaz/openbox/commitdiff
make array large enough
authorDana Jansens <danakj@orodu.net>
Fri, 19 Feb 2010 22:17:14 +0000 (17:17 -0500)
committerDana Jansens <danakj@orodu.net>
Fri, 19 Feb 2010 22:17:14 +0000 (17:17 -0500)
obt/keyboard.c

index 30aa7f9366ea8abffe468183337624809f877abc..5b80fd8af52dab485564b4021451908c8cc4a4a9 100644 (file)
@@ -300,7 +300,7 @@ KeyCode* obt_keyboard_keysym_to_keycode(KeySym sym)
     for (i = min_keycode; i <= max_keycode; ++i)
         for (j = 0; j < keysyms_per_keycode; ++j)
             if (sym == keymap[(i-min_keycode) * keysyms_per_keycode + j]) {
-                ret = g_renew(KeyCode, ret, ++n);
+                ret = g_renew(KeyCode, ret, ++n + 1);
                 ret[n-1] = i;
                 ret[n] = 0;
             }
This page took 0.026268 seconds and 4 git commands to generate.