diff --git a/src/hb-serialize.hh b/src/hb-serialize.hh index 0bd9f035c..a0b92280d 100644 --- a/src/hb-serialize.hh +++ b/src/hb-serialize.hh @@ -260,13 +260,13 @@ struct hb_serialize_context_t if (link.is_wide) { - auto &off = * ((BEInt *) (parent.head + offset)); + auto &off = * ((BEInt *) (parent.head + link.position)); off = offset; propagate_error (off == offset); } else { - auto &off = * ((BEInt *) (parent.head + offset)); + auto &off = * ((BEInt *) (parent.head + link.position)); off = offset; propagate_error (off == offset); }