fix box item finding as spotted by Igor Murzov

SVN revision: 78613
This commit is contained in:
Mike Blumenkrantz 2012-10-29 11:59:55 +00:00
parent 676c71a2a1
commit ab6d671328
1 changed files with 3 additions and 3 deletions

View File

@ -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++;