mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-04-29 03:40:40 +02:00
* src/sfnt/sfwoff2.c (reconstruct_glyf): Revise variables.
This should fix #1379 while resonstructing the code intent.
This commit is contained in:
parent
7cc8f37b9a
commit
28407bc8cd
1 changed files with 4 additions and 6 deletions
|
|
@ -1043,7 +1043,6 @@
|
|||
FT_ULong total_n_points = 0;
|
||||
FT_UShort n_points_contour;
|
||||
FT_UInt j;
|
||||
FT_ULong flag_size;
|
||||
FT_ULong triplet_size;
|
||||
FT_ULong triplet_bytes_used;
|
||||
FT_Bool have_overlap = FALSE;
|
||||
|
|
@ -1088,8 +1087,8 @@
|
|||
}
|
||||
substreams[N_POINTS_STREAM].offset = FT_STREAM_POS();
|
||||
|
||||
flag_size = total_n_points;
|
||||
if ( flag_size > substreams[FLAG_STREAM].size )
|
||||
points_size += total_n_points;
|
||||
if ( points_size > substreams[FLAG_STREAM].size )
|
||||
goto Fail;
|
||||
|
||||
flags_buf = stream->base + substreams[FLAG_STREAM].offset;
|
||||
|
|
@ -1106,8 +1105,7 @@
|
|||
triplet_bytes_used = 0;
|
||||
|
||||
/* Create array to store point information. */
|
||||
points_size = total_n_points;
|
||||
if ( FT_QNEW_ARRAY( points, points_size ) )
|
||||
if ( FT_QNEW_ARRAY( points, total_n_points ) )
|
||||
goto Fail;
|
||||
|
||||
if ( triplet_decode( flags_buf,
|
||||
|
|
@ -1118,7 +1116,7 @@
|
|||
&triplet_bytes_used ) )
|
||||
goto Fail;
|
||||
|
||||
substreams[FLAG_STREAM].offset += flag_size;
|
||||
substreams[FLAG_STREAM].offset += total_n_points;
|
||||
substreams[GLYPH_STREAM].offset += triplet_bytes_used;
|
||||
|
||||
if ( FT_STREAM_SEEK( substreams[GLYPH_STREAM].offset ) ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue