From e7c595a9f09ba1552b2de1f8d56cbdcf376b9cad Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 15 Oct 2018 23:34:54 -0700 Subject: [PATCH] [name] More --- src/hb-ot-name.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-name.cc b/src/hb-ot-name.cc index 22149e44..e6dbe0a4 100644 --- a/src/hb-ot-name.cc +++ b/src/hb-ot-name.cc @@ -62,13 +62,14 @@ hb_ot_name_get_utf (hb_face_t *face, const OT::name_accelerator_t &name = _get_name (face); unsigned int idx = 0; //XXX hb_bytes_t bytes = name.table->get_name (idx); - if (*text_size) + if (text_size && *text_size) { /* TODO Switch to walking string and validating. */ memcpy (text, bytes.arrayZ, MIN (*text_size * 2, bytes.len)); } /* XXX Null-terminate. */ - *text_size = bytes.len / 2; //TODO + if (text_size) + *text_size = bytes.len / 2; //TODO /* TODO Fallback? */ return true; //XXX } -- GitLab