From ab6d6713281082d84078c6a6dcad7aa5a46b6b9a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 29 Oct 2012 11:59:55 +0000 Subject: [PATCH] fix box item finding as spotted by Igor Murzov SVN revision: 78613 --- src/bin/e_box.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/e_box.c b/src/bin/e_box.c index fa3f6c83f..e80c0f51d 100644 --- a/src/bin/e_box.c +++ b/src/bin/e_box.c @@ -83,15 +83,15 @@ _e_box_item_nth_get(E_Smart_Data *sd, unsigned int n) if (n > sd->item_count / 2) { x = sd->item_count - 1; - EINA_INLIST_REVERSE_FOREACH(EINA_INLIST_GET(sd->items)->last, bi) + EINA_INLIST_REVERSE_FOREACH(EINA_INLIST_GET(sd->items), bi) { if (n == x) return bi->obj; - x++; + x--; } return NULL; } x = 0; - EINA_INLIST_FOREACH(EINA_INLIST_GET(sd->items)->last, bi) + EINA_INLIST_FOREACH(EINA_INLIST_GET(sd->items), bi) { if (n == x) return bi->obj; x++;