From a080c596846a9a529be1e922814a834f4913269d Mon Sep 17 00:00:00 2001 From: antognolli Date: Fri, 30 Oct 2009 14:30:15 +0000 Subject: [PATCH] Fix ethumb_calculate_fill_from_ratio(). Default values should be assigned to the return variables even if the aspect ratio is 0. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ethumb@43352 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/Ethumb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/Ethumb.c b/src/lib/Ethumb.c index 52eb069..be4d3f6 100644 --- a/src/lib/Ethumb.c +++ b/src/lib/Ethumb.c @@ -1000,13 +1000,14 @@ ethumb_calculate_fill_from_ratio(Ethumb *e, float ia, int *fx, int *fy, int *fw, { float a; - if (ia == 0) - return; - *fw = e->tw; *fh = e->th; *fx = 0; *fy = 0; + + if (ia == 0) + return; + a = e->tw / (float)e->th; if (e->aspect == ETHUMB_THUMB_CROP) -- 2.7.4