elm/examples: Fix layout_example_02.
authorRafael Antognolli <rafael.antognolli@intel.com>
Mon, 8 Apr 2013 19:17:13 +0000 (16:17 -0300)
committerRafael Antognolli <rafael.antognolli@intel.com>
Mon, 8 Apr 2013 19:21:10 +0000 (16:21 -0300)
Remove segfault and correctly cycle through the icons.

ChangeLog
src/examples/layout_example_02.c

index d50b1455e7f5e98ab4c44d08d8fe8218009333e7..cef116c82d5c48c89417ab8649d2b1984f4a9c63 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 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.
index 9bf59dde3f7815b8635279f053ad49fb2dd9010b..efa981ccd87c30d41bc6d7c16adef2defe8a53da 100644 (file)
@@ -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;