From: Michael Stapelberg Date: Thu, 11 Jun 2009 01:30:56 +0000 (+0200) Subject: Bugfix: Use the correct size for the modifiers (Thanks Moredread!) X-Git-Tag: 3.b~64 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6e5406167c85b86f6e4a45f3fa0c0ced85dcd0e8;p=i3%2Fi3 Bugfix: Use the correct size for the modifiers (Thanks Moredread!) --- diff --git a/src/xcb.c b/src/xcb.c index cefb9c33..db38a7bb 100644 --- a/src/xcb.c +++ b/src/xcb.c @@ -267,10 +267,11 @@ void xcb_get_numlock_mask(xcb_connection_t *conn) { /* For now, we only use the first keysymbol. */ xcb_keycode_t *numlock_syms = xcb_key_symbols_get_keycode(keysyms, XCB_NUM_LOCK); xcb_keycode_t numlock = *numlock_syms; + free(numlock_syms); #endif /* Check all modifiers (Mod1-Mod5, Shift, Control, Lock) */ - for (mask = 0; mask < sizeof(masks); mask++) + for (mask = 0; mask < 8; mask++) for (i = 0; i < reply->keycodes_per_modifier; i++) if (modmap[(mask * reply->keycodes_per_modifier) + i] == numlock) xcb_numlock_mask = masks[mask];