[subset] Assert offsets are zero during relocation
If they're not, it's a bug in our subsetting logic somewhere. So check.
This commit is contained in:
parent
efbba7ad26
commit
db0c9a1485
|
@ -294,12 +294,14 @@ struct hb_serialize_context_t
|
||||||
if (link.is_wide)
|
if (link.is_wide)
|
||||||
{
|
{
|
||||||
auto &off = * ((BEInt<uint32_t, 4> *) (parent.head + link.position));
|
auto &off = * ((BEInt<uint32_t, 4> *) (parent.head + link.position));
|
||||||
|
assert (0 == off);
|
||||||
off = offset;
|
off = offset;
|
||||||
propagate_error (off == offset);
|
propagate_error (off == offset);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto &off = * ((BEInt<uint16_t, 2> *) (parent.head + link.position));
|
auto &off = * ((BEInt<uint16_t, 2> *) (parent.head + link.position));
|
||||||
|
assert (0 == off);
|
||||||
off = offset;
|
off = offset;
|
||||||
propagate_error (off == offset);
|
propagate_error (off == offset);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue