forked from AuroraMiddleware/gtk
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:
parent
053617a283
commit
77ffc1f9ed
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user