From: Po Lu <luangruo@yahoo.com>
Date: Tue, 19 Dec 2023 06:39:28 +0000 (+0800)
Subject: Properly sign-extend freedom and projection vector values
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d0e3dfa764cdb5c15c2a525b455df495097a86bb;p=emacs.git

Properly sign-extend freedom and projection vector values

* src/sfnt.c (GPV, GFV): Cast versors to int32_t.
---

diff --git a/src/sfnt.c b/src/sfnt.c
index 1b4cdf38bd0..c33f21215a6 100644
--- a/src/sfnt.c
+++ b/src/sfnt.c
@@ -8080,8 +8080,8 @@ sfnt_interpret_trap (struct sfnt_interpreter *interpreter,
     vector					\
       = interpreter->state.projection_vector;	\
 						\
-    PUSH ((uint16_t) vector.x);			\
-    PUSH ((uint16_t) vector.y);			\
+    PUSH ((int32_t) vector.x);			\
+    PUSH ((int32_t) vector.y);			\
   }
 
 #define GFV()					\
@@ -8091,8 +8091,8 @@ sfnt_interpret_trap (struct sfnt_interpreter *interpreter,
     vector					\
       = interpreter->state.freedom_vector;	\
 						\
-    PUSH ((uint16_t) vector.x);			\
-    PUSH ((uint16_t) vector.y);			\
+    PUSH ((int32_t) vector.x);			\
+    PUSH ((int32_t) vector.y);			\
   }
 
 #define SFVTPV()				\