summaryrefslogtreecommitdiff
path: root/legacy/ethumb
diff options
context:
space:
mode:
authorRafael Antognolli <antognolli@gmail.com>2009-10-30 14:30:15 +0000
committerRafael Antognolli <antognolli@gmail.com>2009-10-30 14:30:15 +0000
commit0db1dc430be0b67a6b96f4cf9447b0eaefb0f5b8 (patch)
tree2f8ddc63f902873b6d68c25c9614d557e3d2227e /legacy/ethumb
parent765e9810419f4ed9158c7a77b09df3c8f7704e58 (diff)
Fix ethumb_calculate_fill_from_ratio().
Default values should be assigned to the return variables even if the aspect ratio is 0. SVN revision: 43352
Diffstat (limited to 'legacy/ethumb')
-rw-r--r--legacy/ethumb/src/lib/Ethumb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/legacy/ethumb/src/lib/Ethumb.c b/legacy/ethumb/src/lib/Ethumb.c
index 52eb069641..be4d3f61fd 100644
--- a/legacy/ethumb/src/lib/Ethumb.c
+++ b/legacy/ethumb/src/lib/Ethumb.c
@@ -1000,13 +1000,14 @@ ethumb_calculate_fill_from_ratio(Ethumb *e, float ia, int *fx, int *fy, int *fw,
1000{ 1000{
1001 float a; 1001 float a;
1002 1002
1003 if (ia == 0)
1004 return;
1005
1006 *fw = e->tw; 1003 *fw = e->tw;
1007 *fh = e->th; 1004 *fh = e->th;
1008 *fx = 0; 1005 *fx = 0;
1009 *fy = 0; 1006 *fy = 0;
1007
1008 if (ia == 0)
1009 return;
1010
1010 a = e->tw / (float)e->th; 1011 a = e->tw / (float)e->th;
1011 1012
1012 if (e->aspect == ETHUMB_THUMB_CROP) 1013 if (e->aspect == ETHUMB_THUMB_CROP)