[sfnt] Fix off-by-one error.
The 0-base index is equal to the number of previosly parsed entries. It is an error to adjust it by one to get the number truncated by a stream error. This is probably inconsequential because valid entries are correctly accounted for. * src/sfnt/ttload.c (check_table_dir): Do not adjust the truncated number of tables.
This commit is contained in:
parent
7a493e3a40
commit
ca01112894
|
@ -205,7 +205,6 @@
|
||||||
|
|
||||||
if ( FT_STREAM_READ_FIELDS( table_dir_entry_fields, &table ) )
|
if ( FT_STREAM_READ_FIELDS( table_dir_entry_fields, &table ) )
|
||||||
{
|
{
|
||||||
nn--;
|
|
||||||
FT_TRACE2(( "check_table_dir:"
|
FT_TRACE2(( "check_table_dir:"
|
||||||
" can read only %d table%s in font (instead of %d)\n",
|
" can read only %d table%s in font (instead of %d)\n",
|
||||||
nn, nn == 1 ? "" : "s", sfnt->num_tables ));
|
nn, nn == 1 ? "" : "s", sfnt->num_tables ));
|
||||||
|
|
Loading…
Reference in New Issue