From 0e0ea976cadb950258d7f3754f8fe581d092e36a Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 3 Apr 2023 10:23:33 +0800 Subject: [PATCH] Update Android port * src/sfnt.c (sfnt_normalize_vector): Don't rely on undefined sign extension semantics. --- src/sfnt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sfnt.c b/src/sfnt.c index f30093ba765..800adc19214 100644 --- a/src/sfnt.c +++ b/src/sfnt.c @@ -8241,8 +8241,8 @@ sfnt_normalize_vector (sfnt_f26dot6 vx, sfnt_f26dot6 vy, goto fail; /* Long division.. eek! */ - vector->x = (sfnt_div_fixed (vx * 1024, magnitude) >> 2); - vector->y = (sfnt_div_fixed (vy * 1024, magnitude) >> 2); + vector->x = (sfnt_div_fixed (vx * 1024, magnitude) / 4); + vector->y = (sfnt_div_fixed (vy * 1024, magnitude) / 4); } /* Compute a unit vector describing the direction of a line from the -- 2.39.2