fix Head with link.bias

This commit is contained in:
ariza 2020-02-19 13:55:39 -08:00
parent e65bff0943
commit 6120f50c8f
1 changed files with 1 additions and 1 deletions

View File

@ -324,7 +324,7 @@ struct hb_serialize_context_t
if (unlikely (!child)) { err_other_error(); return; } if (unlikely (!child)) { err_other_error(); return; }
unsigned offset; unsigned offset;
switch ((whence_t)link.whence) { switch ((whence_t)link.whence) {
case Head: offset = child->head - parent->head; break; case Head: offset = (child->head - parent->head) - link.bias; break;
case Tail: offset = child->head - parent->tail; break; case Tail: offset = child->head - parent->tail; break;
case Absolute: offset = (head - start) + (child->head - tail); break; case Absolute: offset = (head - start) + (child->head - tail); break;
default: assert (0); default: assert (0);