diff --git a/src/hb-subset-cff-common.hh b/src/hb-subset-cff-common.hh index f1767d743..a8c4f8a3f 100644 --- a/src/hb-subset-cff-common.hh +++ b/src/hb-subset-cff-common.hh @@ -120,8 +120,11 @@ struct str_encoder_t /* Faster than hb_memcpy for small strings. */ auto arr = buff.arrayZ + offset; - for (unsigned i = 0; i < length; i++) + /* Length is at least one; and mostly just one. */ + arr[0] = str[0]; + for (unsigned i = 1; i < length; i++) arr[i] = str[i]; + //hb_memcpy (buff.arrayZ + offset, str, length); }