From 03b9b1d12ec88240966f9a5401b95cddc4878b49 Mon Sep 17 00:00:00 2001 From: raster Date: Mon, 23 May 2011 13:12:35 +0000 Subject: [PATCH] fix out of bounds check. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@59628 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/test_flip_page.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/test_flip_page.c b/src/bin/test_flip_page.c index 37d6084..6718722 100644 --- a/src/bin/test_flip_page.c +++ b/src/bin/test_flip_page.c @@ -713,6 +713,8 @@ im_up_cb(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, if (st->y > (st->h / 2)) st->finish = 1; tm = 1.0 - ((double)st->y / (double)st->h); } + if (tm < 0.01) tm = 0.01; + else if (tm > 0.99) tm = 0.99; if (!st->finish) tm = 1.0 - tm; tm *= 0.5; st->anim = ecore_animator_timeline_add(tm, _state_anim, st); -- 2.7.4