From 8c9451107d46c87ed0e50e718977f0c286972f3b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 28 Mar 2018 14:06:58 -0700 Subject: [PATCH] Fix one UBSan warning Fixes https://github.com/harfbuzz/harfbuzz/issues/935 --- src/hb-font-private.hh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hb-font-private.hh b/src/hb-font-private.hh index 992152f17..7ba16cdef 100644 --- a/src/hb-font-private.hh +++ b/src/hb-font-private.hh @@ -83,7 +83,11 @@ struct hb_font_funcs_t { HB_FONT_FUNCS_IMPLEMENT_CALLBACKS #undef HB_FONT_FUNC_IMPLEMENT } f; - void (*array[VAR]) (void); + void (*array[0 +#define HB_FONT_FUNC_IMPLEMENT(name) +1 + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + ]) (void); } get; };