summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-04-08 16:17:13 -0300
committerRafael Antognolli <rafael.antognolli@intel.com>2013-04-08 16:21:10 -0300
commit0041983efed5dbc821fab9ef3f892bf472a86884 (patch)
treefa8f2d076dc42542060d49950250a368b18f0c04
parent6aa22125e37eedd267afca39f36a6095e6c5c814 (diff)
downloadelementary-0041983efed5dbc821fab9ef3f892bf472a86884.tar.gz
elm/examples: Fix layout_example_02.
Remove segfault and correctly cycle through the icons.
-rw-r--r--ChangeLog4
-rw-r--r--src/examples/layout_example_02.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d50b1455e..cef116c82 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 9bf59dde3..efa981ccd 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;