提交 db0c9a14 编写于 作者: B Behdad Esfahbod

[subset] Assert offsets are zero during relocation

If they're not, it's a bug in our subsetting logic somewhere.  So check.
上级 efbba7ad
......@@ -294,12 +294,14 @@ struct hb_serialize_context_t
if (link.is_wide)
{
auto &off = * ((BEInt<uint32_t, 4> *) (parent.head + link.position));
assert (0 == off);
off = offset;
propagate_error (off == offset);
}
else
{
auto &off = * ((BEInt<uint16_t, 2> *) (parent.head + link.position));
assert (0 == off);
off = offset;
propagate_error (off == offset);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册