Commit d247c56278215d2ff9cb65563fe250b9a852c18a

Ben Wagner 2022-03-31T18:54:15

[truetype] Use SUB_LONG for component offset. * src/truetype/ttgload.c (TT_Process_Composite_Component): do it. Bug: https://crbug.com/1309429

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index b189f98..23c645f 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1228,8 +1228,8 @@
       p1 = gloader->base.outline.points + k;
       p2 = gloader->base.outline.points + l;
 
-      x = p1->x - p2->x;
-      y = p1->y - p2->y;
+      x = SUB_LONG(p1->x, p2->x);
+      y = SUB_LONG(p1->y, p2->y);
     }
     else
     {