freetype: fix failing test / do not return pointer to stack

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-06-10 13:42:48 -07:00
parent 80157a99fc
commit 7d7eb807f8
2 changed files with 5 additions and 5 deletions

View file

@ -74,5 +74,6 @@ test "get name index" {
test "get index name" {
const lib = try freetype.Library.init();
const face = try lib.newFace(firasnas_font_path, 0);
try testing.expectEqualStrings("summation", try face.getGlyphName(1120));
var name_buf: [30]u8 = undefined;
try testing.expectEqualStrings("summation", try face.getGlyphName(1120, &name_buf));
}