[base] Handle collapsed outlines to avoid undefined FT_MSB.

* src/base/ftoutln.c (FT_Outline_Get_Orientation): Update.
This commit is contained in:
Alexei Podtelezhnikov 2014-08-12 00:26:16 -04:00
parent 4728993fa8
commit 28018d42a8
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
[base] Handle collapsed outlines to avoid undefined FT_MSB.
* src/base/ftoutln.c (FT_Outline_Get_Orientation): Update.
2014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
[base] Restore FT_MulFix inlining.

View File

@ -1045,6 +1045,10 @@
FT_Outline_Get_CBox( outline, &cbox );
/* Handle collapsed outlines to avoid undefined FT_MSB. */
if ( cbox.xMin == cbox.xMax || cbox.yMin == cbox.yMax )
return FT_ORIENTATION_NONE;
xshift = FT_MSB( FT_ABS( cbox.xMax ) | FT_ABS( cbox.xMin ) ) - 14;
xshift = FT_MAX( xshift, 0 );