[autofit] Fix reallocation error introduced in 2016-02-27 (#47310).

* src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign
`prev_segment' after reallocation.
This commit is contained in:
Werner Lemberg 2016-03-01 07:10:30 +01:00
parent 015c6e08a1
commit 3eb6f66a37
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2016-03-01 Werner Lemberg <wl@gnu.org>
[autofit] Fix reallocation error introduced in 2016-02-27 (#47310).
* src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign
`prev_segment' after reallocation.
2016-03-01 Werner Lemberg <wl@gnu.org>
Fix clang warnings.

View File

@ -1701,6 +1701,11 @@
segment->first = point;
segment->last = point;
/* `af_axis_hints_new_segment' reallocates memory, */
/* thus we have to refresh the `prev_segment' pointer */
if ( prev_segment )
prev_segment = segment - 1;
min_pos = max_pos = point->u;
min_coord = max_coord = point->v;
min_flags = max_flags = point->flags;