diff options
Diffstat (limited to 'src/cff/cffload.c')
-rw-r--r-- | src/cff/cffload.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cff/cffload.c b/src/cff/cffload.c index fcb7348..c61222d 100644 --- a/src/cff/cffload.c +++ b/src/cff/cffload.c @@ -1495,9 +1495,9 @@ if ( pure_cff ) { /* well, we don't really forget the `disabled' fonts... */ - subfont_index = (FT_UInt)face_index; + subfont_index = (FT_UInt)( face_index & 0xFFFF ); - if ( subfont_index >= font->name_index.count ) + if ( face_index > 0 && subfont_index >= font->name_index.count ) { FT_ERROR(( "cff_font_load:" " invalid subfont index for pure CFF font (%d)\n", |