]> git.eshelyaron.com Git - emacs.git/commitdiff
Properly sign-extend freedom and projection vector values
authorPo Lu <luangruo@yahoo.com>
Tue, 19 Dec 2023 06:39:28 +0000 (14:39 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 19 Dec 2023 06:41:38 +0000 (14:41 +0800)
* src/sfnt.c (GPV, GFV): Cast versors to int32_t.

src/sfnt.c

index 1b4cdf38bd0efd6d3206c315ded5fbdd26febc0a..c33f21215a651a2993afe1ff30a519a59579304a 100644 (file)
@@ -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()                               \