* src/psaux/pshints.c (cf2_hintmap_insertHint): Fix midpoint computation.
Replace '(start + end) / 2' with 'start + (end - start) / 2' to avoid overflow. Fixes #1180.
This commit is contained in:
parent
2adb810c3d
commit
de8f14a8e4
|
@ -693,8 +693,10 @@
|
|||
CF2_Fixed midpoint =
|
||||
cf2_hintmap_map(
|
||||
hintmap->initialHintMap,
|
||||
ADD_INT32( secondHintEdge->csCoord,
|
||||
firstHintEdge->csCoord ) / 2 );
|
||||
ADD_INT32(
|
||||
firstHintEdge->csCoord,
|
||||
SUB_INT32 ( secondHintEdge->csCoord,
|
||||
firstHintEdge->csCoord ) / 2 ) );
|
||||
CF2_Fixed halfWidth =
|
||||
FT_MulFix( SUB_INT32( secondHintEdge->csCoord,
|
||||
firstHintEdge->csCoord ) / 2,
|
||||
|
|
Loading…
Reference in New Issue