From d0e3dfa764cdb5c15c2a525b455df495097a86bb Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 19 Dec 2023 14:39:28 +0800 Subject: [PATCH] Properly sign-extend freedom and projection vector values * src/sfnt.c (GPV, GFV): Cast versors to int32_t. --- src/sfnt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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() \ -- 2.39.2