forked from minhngoc25a/freetype2
* src/autofit/afhints.c (af_get_segment_index): Fix it.
The old code was too simple, returning invalid values in most cases where a segment crosses the contour start.
This commit is contained in:
parent
94cacac594
commit
68fb4789a5
|
@ -1,3 +1,10 @@
|
|||
2015-11-15 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/autofit/afhints.c (af_get_segment_index): Fix it.
|
||||
|
||||
The old code was too simple, returning invalid values in most cases
|
||||
where a segment crosses the contour start.
|
||||
|
||||
2015-11-15 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439).
|
||||
|
|
|
@ -257,11 +257,23 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( point >= segment->first || point <= segment->last )
|
||||
break;
|
||||
AF_Point p = segment->first;
|
||||
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if ( point == p )
|
||||
goto Exit;
|
||||
|
||||
if ( p == segment->last )
|
||||
break;
|
||||
|
||||
p = p->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Exit:
|
||||
if ( segment == limit )
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue