From 44b230b56a02205ce66072ad8ff3560926cff6a2 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Mon, 8 Apr 2013 16:17:13 -0300 Subject: [PATCH] elm/examples: Fix layout_example_02. Remove segfault and correctly cycle through the icons. --- legacy/elementary/ChangeLog | 4 ++++ legacy/elementary/src/examples/layout_example_02.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index 9736dc1306..343e8488a9 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/ChangeLog @@ -1216,3 +1216,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/legacy/elementary/src/examples/layout_example_02.c b/legacy/elementary/src/examples/layout_example_02.c index 034e59fd0f..95cf0768d2 100644 --- a/legacy/elementary/src/examples/layout_example_02.c +++ b/legacy/elementary/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;