[HarfBuzz] harfbuzz: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sat Oct 13 17:37:51 UTC 2018
src/hb-aat-layout-kerx-table.hh | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
New commits:
commit 71f76f2f39c88998b430b171c99b85818d4fa0ab
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Oct 13 13:36:27 2018 -0400
[kerx] Fix-up previous commit
A "&" was missing. Go back to using pointers that are less error-prone.
diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh
index d65f3093..95dd50dd 100644
--- a/src/hb-aat-layout-kerx-table.hh
+++ b/src/hb-aat-layout-kerx-table.hh
@@ -232,9 +232,9 @@ struct KerxSubTableFormat2
unsigned int l = (this+leftClassTable).get_value_or_null (left, num_glyphs);
unsigned int r = (this+rightClassTable).get_value_or_null (right, num_glyphs);
unsigned int offset = l + r;
- const FWORD v = StructAtOffset<FWORD> (&(this+array), offset);
- if (unlikely (!v.sanitize (&c->sanitizer))) return 0;
- return v;
+ const FWORD *v = &StructAtOffset<FWORD> (&(this+array), offset);
+ if (unlikely (!v->sanitize (&c->sanitizer))) return 0;
+ return *v;
}
inline bool apply (hb_aat_apply_context_t *c) const
@@ -479,9 +479,9 @@ struct KerxSubTableFormat6
unsigned int offset = l + r;
if (unlikely (offset < l)) return 0; /* Addition overflow. */
if (unlikely (hb_unsigned_mul_overflows (offset, sizeof (FWORD32)))) return 0;
- const FWORD32 &v = StructAtOffset<FWORD32> (&(this+t.array), offset * sizeof (FWORD32));
- if (unlikely (!v.sanitize (&c->sanitizer))) return 0;
- return v;
+ const FWORD32 *v = &StructAtOffset<FWORD32> (&(this+t.array), offset * sizeof (FWORD32));
+ if (unlikely (!v->sanitize (&c->sanitizer))) return 0;
+ return *v;
}
else
{
@@ -489,9 +489,9 @@ struct KerxSubTableFormat6
unsigned int l = (this+t.rowIndexTable).get_value_or_null (left, num_glyphs);
unsigned int r = (this+t.columnIndexTable).get_value_or_null (right, num_glyphs);
unsigned int offset = l + r;
- const FWORD &v = StructAtOffset<FWORD> (&(this+t.array), offset * sizeof (FWORD));
- if (unlikely (!v.sanitize (&c->sanitizer))) return 0;
- return v;
+ const FWORD *v = &StructAtOffset<FWORD> (&(this+t.array), offset * sizeof (FWORD));
+ if (unlikely (!v->sanitize (&c->sanitizer))) return 0;
+ return *v;
}
}
More information about the HarfBuzz
mailing list