[name] Fix nul-termination bug
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 24 Oct 2018 05:16:32 +0000 (22:16 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 27 Oct 2018 04:22:26 +0000 (21:22 -0700)
src/hb-ot-name.cc

index 56f8933..7962d8b 100644 (file)
@@ -83,7 +83,7 @@ hb_ot_name_convert_utf (const hb_bytes_t                *bytes,
     };
 
     *text_size = dst - text;
-    *text = 0; /* NUL-terminate. */
+    *dst = 0; /* NUL-terminate. */
   }
 
   /* Accumulate length of rest. */