From c1b000da00c747cb46fd4c95ca83bee802d35487 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 5 Mar 2017 20:23:35 +0100 Subject: [PATCH] [sfnt] Remove redundant code. * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for `num_instances', which will always succeed. --- ChangeLog | 7 +++++++ src/sfnt/sfobjs.c | 9 --------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 491543642..3bbfe4206 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-03-05 Werner Lemberg + + [sfnt] Remove redundant code. + + * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for + `num_instances', which will always succeed. + 2017-03-04 Werner Lemberg [sfnt] Add `get_name_id' service. diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index eb4170487..4cc3e3fe7 100644 --- a/src/sfnt/sfobjs.c +++ b/src/sfnt/sfobjs.c @@ -999,15 +999,6 @@ if ( !face->goto_table( face, TTAG_CFF, stream, 0 ) ) num_instances = 0; - /* we support at most 2^15 - 1 instances */ - if ( num_instances >= ( 1U << 15 ) - 1 ) - { - if ( face_instance_index >= 0 ) - return FT_THROW( Invalid_Argument ); - else - num_instances = 0; - } - /* instance indices in `face_instance_index' start with index 1, */ /* thus `>' and not `>=' */ if ( instance_index > num_instances )