From db0c9a1485ae6ca7ca9af38a43504f1ae4ea09c8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 17 Apr 2019 17:58:13 -0400 Subject: [PATCH] [subset] Assert offsets are zero during relocation If they're not, it's a bug in our subsetting logic somewhere. So check. --- src/hb-serialize.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-serialize.hh b/src/hb-serialize.hh index a8fd8d32e..971359f40 100644 --- a/src/hb-serialize.hh +++ b/src/hb-serialize.hh @@ -294,12 +294,14 @@ struct hb_serialize_context_t if (link.is_wide) { auto &off = * ((BEInt *) (parent.head + link.position)); + assert (0 == off); off = offset; propagate_error (off == offset); } else { auto &off = * ((BEInt *) (parent.head + link.position)); + assert (0 == off); off = offset; propagate_error (off == offset); }