From 140552cec98684cdab72a29ee59ba6ddfcca75b4 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 9 Oct 2020 18:01:32 -0600 Subject: [PATCH] [buffer/serialize] Only serialize empty buffers of CONTENT_TYPE_INVALID --- src/hb-buffer-serialize.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-buffer-serialize.cc b/src/hb-buffer-serialize.cc index aac2eb10d..b4200354f 100644 --- a/src/hb-buffer-serialize.cc +++ b/src/hb-buffer-serialize.cc @@ -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;