[gtk/gtk-3-22] Fix incorrect optimization in find_builtin_icon().
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-22] Fix incorrect optimization in find_builtin_icon().
- Date: Sun, 18 Feb 2018 03:04:33 +0000 (UTC)
commit 5aa939dc93a99736232b3a87511e8b78785c13a9
Author: John Lindgren <john jlindgren net>
Date: Sat Feb 17 22:03:27 2018 -0500
Fix incorrect optimization in find_builtin_icon().
When we found an icon with exactly the requested size, we'd stop
searching immediately (good), but we'd neglect to set the returned
min_difference to 0 (bad). This caused theme_lookup_icon() to
prefer other, potentially much worse, matches over the exact one.
gtk/gtkicontheme.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 3225567fb9..a90264d876 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -5399,6 +5399,7 @@ find_builtin_icon (const gchar *icon_name,
if (difference == 0)
{
+ min_difference = 0;
min_icon = default_icon;
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]