From 83350f2fed074058f3f90095c2711196941c2eab Mon Sep 17 00:00:00 2001 From: Andrew Mahone Date: Thu, 29 Jan 2009 03:30:33 +0000 Subject: fix divide-by-zero error in pictureflow when selecting album git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19876 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/pictureflow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/plugins') diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c index ca1f0715b3..2dbbb81d85 100644 --- a/apps/plugins/pictureflow.c +++ b/apps/plugins/pictureflow.c @@ -1180,8 +1180,8 @@ void render_slide(struct slide_data *slide, const int alpha) int distance = (h + slide->distance) * 100 / zoom; - PFreal dist = distance * PFREAL_ONE; if (distance < 100 ) distance = 100; /* clamp distances */ + PFreal dist = distance * PFREAL_ONE; PFreal sdx = fcos(slide->angle); PFreal sdy = fsin(slide->angle); PFreal xs = slide->cx - sw * fdiv(sdx, dist) / 2; -- cgit v1.2.3