One unneeded XKB_NUM_GROUPS less.
Signed-off-by: Ran Benita <ran234@gmail.com>
free(key->num_syms);
free(key->syms);
free(key->actions);
+ free(key->kt_index);
}
darray_free(keymap->keys);
darray_free(keymap->sym_interpret);
union xkb_action *actions;
- unsigned kt_index[XKB_NUM_GROUPS];
+ unsigned *kt_index;
xkb_layout_index_t num_groups;
/* How many levels the largest group has. */
* Find and assign the groups' types in the keymap. Also find the
* key width according to the largest type.
*/
+ key->kt_index = calloc(key->num_groups, sizeof(*key->kt_index));
key->width = 0;
darray_enumerate(i, groupi, keyi->groups) {
struct xkb_key_type *type;