[psaux] Optimize previous commit.

* src/psaux/t1decode.c (t1_decoder_parse_charstrings)
<op_callothersubr>: Move error check down to avoid testing twice for
good cases.
This commit is contained in:
Алексей Подтележников 2011-07-10 07:08:51 +02:00 committed by Werner Lemberg
parent c46b1e2476
commit dc33b4a155
2 changed files with 16 additions and 8 deletions

View File

@ -1,3 +1,11 @@
2011-07-10 Алексей Подтележников <apodtele@gmail.com>
[psaux] Optimize previous commit.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings)
<op_callothersubr>: Move error check down to avoid testing twice for
good cases.
2011-07-08 Werner Lemberg <wl@gnu.org>
[psaux] Add better argument check for `callothersubr'.

View File

@ -686,9 +686,6 @@
subr_no = (FT_Int)( top[1] >> 16 );
arg_cnt = (FT_Int)( top[0] >> 16 );
if ( arg_cnt < 0 || subr_no < 0 )
goto Unexpected_OtherSubr;
/***********************************************************/
/* */
/* remove all operands to callothersubr from the stack */
@ -1011,11 +1008,14 @@
break;
default:
FT_ERROR(( "t1_decoder_parse_charstrings:"
" unknown othersubr [%d %d], wish me luck\n",
arg_cnt, subr_no ));
unknown_othersubr_result_cnt = arg_cnt;
break;
if ( arg_cnt >= 0 && subr_no > 0 )
{
FT_ERROR(( "t1_decoder_parse_charstrings:"
" unknown othersubr [%d %d], wish me luck\n",
arg_cnt, subr_no ));
unknown_othersubr_result_cnt = arg_cnt;
break;
}
Unexpected_OtherSubr:
FT_ERROR(( "t1_decoder_parse_charstrings:"