[serialize] Fix offset calculation

This commit is contained in:
Behdad Esfahbod 2019-04-17 17:59:39 -04:00
parent db0c9a1485
commit 693d91cd49

View file

@ -272,7 +272,7 @@ struct hb_serialize_context_t
auto& link = *current->links.push ();
link.is_wide = sizeof (T) == 4;
link.position = (const char *) &ofs - (const char *) base;
link.position = (const char *) &ofs - current->head;
link.bias = (const char *) base - current->head;
link.objidx = objidx;
}