[buffer/serialize] Only serialize empty buffers of CONTENT_TYPE_INVALID

This commit is contained in:
Behdad Esfahbod 2020-10-09 18:01:32 -06:00
parent 04658ec48f
commit 140552cec9
1 changed files with 2 additions and 0 deletions

View File

@ -605,6 +605,8 @@ _hb_buffer_serialize_invalid (hb_buffer_t *buffer,
hb_buffer_serialize_format_t format,
hb_buffer_serialize_flags_t flags)
{
assert (!buffer->len);
unsigned int sconsumed;
if (!buf_consumed)
buf_consumed = &sconsumed;