From 7b9bb510b4a6d00e33e9fd897810f950c64752ba Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sat, 21 Nov 2015 15:17:47 +0100 Subject: [PATCH] efreet_icon: Fix wrong inherit selection Summary: The list of elem->paths is given with the actual icon at position 0 and the bigger the index is the lower the icon in the inherit structure is. Due to the for loop beginning at 0 walking to the end this direction is flipped. So the last r is returned, which is the lowest icon in the inherit structure. This is fixed by returning if the first valid path is found. @fix Test Plan: run jesus or efm with a custom icon theme beore the wrong icons are taken, now the correct ones are taken Reviewers: raster, cedric Subscribers: DaveMDS Differential Revision: https://phab.enlightenment.org/D3366 --- src/lib/efreet/efreet_icon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/efreet/efreet_icon.c b/src/lib/efreet/efreet_icon.c index 8980520..6b02bfb 100644 --- a/src/lib/efreet/efreet_icon.c +++ b/src/lib/efreet/efreet_icon.c @@ -714,6 +714,8 @@ efreet_icon_lookup_path_path(Efreet_Cache_Icon_Element *elem, const char *path) r = elem->paths[i]; break; } + if (r) + break; } free((void*) path); -- 2.7.4