Unbreak getting Nth element from boxes.

Fixes crashes in Places gadget.


-- Igor
>From db253fa711e80724a4b9237ea02fa5c6e597921c Mon Sep 17 00:00:00 2001
From: Igor Murzov <e-m...@date.by>
Date: Sun, 28 Oct 2012 16:22:15 +0400
Subject: [PATCH 2/6] Unbreak getting Nth element from boxes.

Nice try zmike, but you won't get cedric's laurels. Never! Spank! Spank!

Fixes crashes in Places gadget, which were the cause of intoducing
stupid modules blacklist by raster instead of fixing actual bug. So some
spankies go to raster too.
---
 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 1fbd797..7273b55 100644
--- a/src/bin/e_box.c
+++ b/src/bin/e_box.c
@@ -82,15 +82,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++;
-- 
1.7.12.1

------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to