[sfnt] Fix `sizeof' thinko.
* src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_palette_set): Don't use `sizeof' for computing array limit.
This commit is contained in:
parent
22d1be3f2c
commit
c07ca2a1b3
|
@ -1,3 +1,10 @@
|
||||||
|
2018-06-12 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
[sfnt] Fix `sizeof' thinko.
|
||||||
|
|
||||||
|
* src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_palette_set): Don't
|
||||||
|
use `sizeof' for computing array limit.
|
||||||
|
|
||||||
2018-06-12 Werner Lemberg <wl@gnu.org>
|
2018-06-12 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
Finish CPAL/COLR support (4/4).
|
Finish CPAL/COLR support (4/4).
|
||||||
|
|
|
@ -227,7 +227,7 @@
|
||||||
|
|
||||||
p = cpal_table + type_offset;
|
p = cpal_table + type_offset;
|
||||||
q = array;
|
q = array;
|
||||||
limit = q + face->palette_data.num_palettes * sizeof ( FT_UShort );
|
limit = q + face->palette_data.num_palettes;
|
||||||
|
|
||||||
while ( q < limit )
|
while ( q < limit )
|
||||||
*q++ = FT_NEXT_USHORT( p );
|
*q++ = FT_NEXT_USHORT( p );
|
||||||
|
@ -248,7 +248,7 @@
|
||||||
|
|
||||||
p = cpal_table + label_offset;
|
p = cpal_table + label_offset;
|
||||||
q = array;
|
q = array;
|
||||||
limit = q + face->palette_data.num_palettes * sizeof ( FT_UShort );
|
limit = q + face->palette_data.num_palettes;
|
||||||
|
|
||||||
while ( q < limit )
|
while ( q < limit )
|
||||||
*q++ = FT_NEXT_USHORT( p );
|
*q++ = FT_NEXT_USHORT( p );
|
||||||
|
@ -269,8 +269,7 @@
|
||||||
|
|
||||||
p = cpal_table + entry_label_offset;
|
p = cpal_table + entry_label_offset;
|
||||||
q = array;
|
q = array;
|
||||||
limit = q + face->palette_data.num_palette_entries *
|
limit = q + face->palette_data.num_palette_entries;
|
||||||
sizeof ( FT_UShort );
|
|
||||||
|
|
||||||
while ( q < limit )
|
while ( q < limit )
|
||||||
*q++ = FT_NEXT_USHORT( p );
|
*q++ = FT_NEXT_USHORT( p );
|
||||||
|
@ -459,7 +458,7 @@
|
||||||
p = cpal->colors + COLOR_SIZE * FT_PEEK_USHORT( offset );
|
p = cpal->colors + COLOR_SIZE * FT_PEEK_USHORT( offset );
|
||||||
|
|
||||||
q = face->palette;
|
q = face->palette;
|
||||||
limit = q + face->palette_data.num_palette_entries * sizeof ( FT_Color );
|
limit = q + face->palette_data.num_palette_entries;
|
||||||
|
|
||||||
while ( q < limit )
|
while ( q < limit )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue