fix out of bounds check.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 23 May 2011 13:12:35 +0000 (13:12 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 23 May 2011 13:12:35 +0000 (13:12 +0000)
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

index 37d6084..6718722 100644 (file)
@@ -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);