antognolli pushed a commit to branch elementary-1.7.

commit 0041983efed5dbc821fab9ef3f892bf472a86884
Author: Rafael Antognolli <[email protected]>
Date:   Mon Apr 8 16:17:13 2013 -0300

    elm/examples: Fix layout_example_02.
    
    Remove segfault and correctly cycle through the icons.
---
 ChangeLog                        | 4 ++++
 src/examples/layout_example_02.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index d50b145..cef116c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -808,3 +808,7 @@
 2013-04-08  Jaehwan Kim
 
         * Fix the scroller show by a page if the page size is set and the 
region_bring_in or region_show is called.
+
+2013-04-08  Rafael Antognolli
+
+        * Fix layout_example_02.
diff --git a/src/examples/layout_example_02.c b/src/examples/layout_example_02.c
index 9bf59dd..efa981c 100644
--- a/src/examples/layout_example_02.c
+++ b/src/examples/layout_example_02.c
@@ -28,7 +28,7 @@ _signal_cb(void *data, Evas_Object *o, const char *emission, 
const char *source)
      app->current++;
 
    if (app->current < 0)
-     app->current = sizeof(images) - 1;
+     app->current = (sizeof(images) / sizeof(images[0])) - 2;
    else if (images[app->current] == NULL)
      app->current = 0;
 

-- 

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html

Reply via email to