keymap: Remove leftover code

When I removed the 0-termination for the entries for
each keyval, I remove the code initializing the key,
but accidentally left the code that adds it to the
array, so gdk_keymap_get_cached_entries_for_keyval
returns one extra, uninitialized value at the end
of the array. Stop doing that.
This commit is contained in:
Matthias Clasen 2020-05-06 13:15:45 -04:00
parent e2058aaecd
commit baf82cdf7a

View File

@ -576,14 +576,10 @@ gdk_keymap_get_cached_entries_for_keyval (GdkKeymap *keymap,
cached = GPOINTER_TO_UINT (g_hash_table_lookup (keymap->cache, GUINT_TO_POINTER (keyval)));
if (cached == 0)
{
GdkKeymapKey key;
offset = keymap->cached_keys->len;
GDK_KEYMAP_GET_CLASS (keymap)->get_entries_for_keyval (keymap, keyval, keymap->cached_keys);
g_array_append_val (keymap->cached_keys, key);
len = keymap->cached_keys->len - offset;
g_assert (len <= 255);