diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c index f2aeae233..dcde7def8 100644 --- a/src/sfnt/ttpost.c +++ b/src/sfnt/ttpost.c @@ -436,13 +436,8 @@ format = face->postscript.FormatType; - if ( format == 0x00010000L ) - { - if ( idx < 258 ) /* paranoid checking */ - *PSname = MAC_NAME( idx ); - } - else if ( format == 0x00020000L || - format == 0x00025000L ) + if ( format == 0x00020000L || + format == 0x00025000L ) { TT_Post_Names names = &face->postscript_names; @@ -466,6 +461,11 @@ } } + /* version 1.0 is only valid with 258 glyphs */ + else if ( format == 0x00010000L && + face->max_profile.numGlyphs == 258 ) + *PSname = MAC_NAME( idx ); + /* nothing to do for format == 0x00030000L */ End: