提交 2eb7e0e0 编写于 作者: B Behdad Esfahbod

[serialize] Minor

上级 1c81cff2
......@@ -165,7 +165,7 @@ struct hb_serialize_context_t
/* Only "pack" if there exist other objects... Otherwise, don't bother.
* Saves a move. */
if (packed.length == 1)
if (packed.length <= 1)
return;
pop_pack ();
......@@ -285,7 +285,10 @@ struct hb_serialize_context_t
void resolve_links ()
{
if (unlikely (in_error ())) return;
assert (!current);
assert (packed.length > 1);
for (const object_t *parent : ++hb_iter (packed))
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册