From 0be12a9f7c8cbc710660d29ec54328916cc41beb Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 27 Jan 2024 11:19:36 -0800 Subject: bitscale.c: ensure SCORE macro expands properly Signed-off-by: Alan Coopersmith --- src/bitmap/bitscale.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c index 4f6d266..b0d0be7 100644 --- a/src/bitmap/bitscale.c +++ b/src/bitmap/bitscale.c @@ -281,15 +281,15 @@ ComputeScaleFactors(FontScalablePtr from, FontScalablePtr to, /* favor enlargement over reduction because of aliasing resulting from reduction */ #define SCORE(m,s) \ -if (m >= 1.0) { \ - if (m == 1.0) \ - score += (16 * s); \ - else if (m == 2.0) \ - score += (4 * s); \ +if ((m) >= 1.0) { \ + if ((m) == 1.0) \ + score += (16 * (s)); \ + else if ((m) == 2.0) \ + score += (4 * (s)); \ else \ - score += (int)(((double)(3 * s)) / m); \ + score += (int)(((double)(3 * (s))) / (m)); \ } else { \ - score += (int)(((double)(2 * s)) * m); \ + score += (int)(((double)(2 * (s))) * (m)); \ } /* don't need to favor enlargement when looking for bitmap that can -- cgit v1.2.3