diff options
author | Manish Singh <yosh@gimp.org> | 2003-12-05 23:33:59 +0000 |
---|---|---|
committer | Manish Singh <yosh@src.gnome.org> | 2003-12-05 23:33:59 +0000 |
commit | 532062df96b3129ded3174d20fe71f0a007c4237 (patch) | |
tree | 5cfdecd91c37062600d48888a4035aeda90850db /gtk/gtkaccelgroup.c | |
parent | 8ad788e914492cd1a48861550e99b010bfa6e24f (diff) | |
download | gdk-pixbuf-532062df96b3129ded3174d20fe71f0a007c4237.tar.gz |
Applied patch from Ross McFarland <rwmcfa1@neces.com>, initialize *count_p
Fri Dec 5 15:30:16 2003 Manish Singh <yosh@gimp.org>
* gtk/gtkaccelgroup.c (quick_accel_find): Applied patch from
Ross McFarland <rwmcfa1@neces.com>, initialize *count_p to 0
before doing anything to prevent garbage returns.
Diffstat (limited to 'gtk/gtkaccelgroup.c')
-rw-r--r-- | gtk/gtkaccelgroup.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c index a327fd260..1f5d029a3 100644 --- a/gtk/gtkaccelgroup.c +++ b/gtk/gtkaccelgroup.c @@ -443,6 +443,8 @@ quick_accel_find (GtkAccelGroup *accel_group, GtkAccelGroupEntry *entry; GtkAccelGroupEntry key; + *count_p = 0; + if (!accel_group->n_accels) return NULL; @@ -460,7 +462,7 @@ quick_accel_find (GtkAccelGroup *accel_group, entry[-1].key.accel_mods != accel_mods) break; /* count equal members */ - for (*count_p = 0; entry + *count_p < accel_group->priv_accels + accel_group->n_accels; (*count_p)++) + for (; entry + *count_p < accel_group->priv_accels + accel_group->n_accels; (*count_p)++) if (entry[*count_p].key.accel_key != accel_key || entry[*count_p].key.accel_mods != accel_mods) break; |