From 22b1d5ca6772b155eaad79b0e0b406e308bd0d86 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 22 Feb 2015 20:41:03 +0100 Subject: [PATCH] [pshinter] Fix thinko. * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly check `count'. Bug introduced two commits earlier. --- ChangeLog | 8 ++++++++ src/pshinter/pshalgo.c | 8 +++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e832dbf5f..c06a10ecf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2015-02-22 Werner Lemberg + + [pshinter] Fix thinko. + + * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly + check `count'. + Bug introduced two commits earlier. + 2015-02-22 Werner Lemberg [raster] Signedness fixes. diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c index d36600e68..d04d1204c 100644 --- a/src/pshinter/pshalgo.c +++ b/src/pshinter/pshalgo.c @@ -1696,14 +1696,12 @@ mask++; for ( ; num_masks > 1; num_masks--, mask++ ) { - FT_UInt next; - FT_UInt count; + FT_UInt next = FT_MIN( mask->end_point, glyph->num_points ); - next = FT_MIN( mask->end_point, glyph->num_points ); - count = next - first; - if ( count > 0 ) + if ( next > first ) { + FT_UInt count = next - first; PSH_Point point = glyph->points + first;