diff options
Diffstat (limited to 'libskrift_get_grapheme_glyph.c')
-rw-r--r-- | libskrift_get_grapheme_glyph.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libskrift_get_grapheme_glyph.c b/libskrift_get_grapheme_glyph.c index fa7a8c5..515e81d 100644 --- a/libskrift_get_grapheme_glyph.c +++ b/libskrift_get_grapheme_glyph.c @@ -38,7 +38,7 @@ libskrift_get_grapheme_glyph(LIBSKRIFT_CONTEXT *ctx, libskrift_codepoint_t codep height = (uint16_t)(sft_chr.height + top + bottom) / vmul; size *= (size_t)width * (size_t)height; - *glyphp = malloc(offsetof(struct libskrift_glyph, image) + size); + *glyphp = malloc(FLEXSTRUCTSIZE(struct libskrift_glyph, image, size)); if (!*glyphp) { free(sft_chr.image); return -1; |