Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
53dfdcd8
by Werner Lemberg at 2022-03-17T19:24:16+01:00
2 changed files:
Changes:
... | ... | @@ -566,7 +566,7 @@ |
566 | 566 | face_index = FT_ABS( face_instance_index ) & 0xFFFF;
|
567 | 567 | |
568 | 568 | /* value -(N+1) requests information on index N */
|
569 | - if ( face_instance_index < 0 )
|
|
569 | + if ( face_instance_index < 0 && face_index > 0 )
|
|
570 | 570 | face_index--;
|
571 | 571 | |
572 | 572 | if ( face_index >= face->ttc_header.count )
|
... | ... | @@ -2085,7 +2085,7 @@ |
2085 | 2085 | /* Validate requested face index. */
|
2086 | 2086 | *num_faces = woff2.num_fonts;
|
2087 | 2087 | /* value -(N+1) requests information on index N */
|
2088 | - if ( *face_instance_index < 0 )
|
|
2088 | + if ( *face_instance_index < 0 && face_index > 0 )
|
|
2089 | 2089 | face_index--;
|
2090 | 2090 | |
2091 | 2091 | if ( face_index >= woff2.num_fonts )
|