[serialize] Minor

This commit is contained in:
Behdad Esfahbod 2019-05-07 12:45:38 -07:00
parent 1c81cff2d3
commit 2eb7e0e0e9
1 changed files with 4 additions and 1 deletions

View File

@ -165,7 +165,7 @@ struct hb_serialize_context_t
/* Only "pack" if there exist other objects... Otherwise, don't bother. /* Only "pack" if there exist other objects... Otherwise, don't bother.
* Saves a move. */ * Saves a move. */
if (packed.length == 1) if (packed.length <= 1)
return; return;
pop_pack (); pop_pack ();
@ -285,7 +285,10 @@ struct hb_serialize_context_t
void resolve_links () void resolve_links ()
{ {
if (unlikely (in_error ())) return;
assert (!current); assert (!current);
assert (packed.length > 1);
for (const object_t *parent : ++hb_iter (packed)) for (const object_t *parent : ++hb_iter (packed))
{ {