From f2e942f3023e3c5cb3e732ee7b4782b3df170a85 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 10 Nov 2018 16:11:14 -0500 Subject: [PATCH] Fix hb_bytes_t's unused template array constructor --- src/hb-dsalgs.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-dsalgs.hh b/src/hb-dsalgs.hh index 9b9cb5f42..2540d438b 100644 --- a/src/hb-dsalgs.hh +++ b/src/hb-dsalgs.hh @@ -524,7 +524,7 @@ struct hb_bytes_t inline hb_bytes_t (const char *bytes_, unsigned int len_) : arrayZ (bytes_), len (len_) {} inline hb_bytes_t (const void *bytes_, unsigned int len_) : arrayZ ((const char *) bytes_), len (len_) {} template - inline hb_bytes_t (const T& array) : arrayZ ((const char *) array.arrayZ), len (array.len) {} + inline hb_bytes_t (const T& array) : arrayZ ((const char *) array.arrayZ), len (array.len * sizeof (array.arrayZ[0])) {} inline operator const void * (void) const { return arrayZ; } inline operator const char * (void) const { return arrayZ; }