diff options
Diffstat (limited to 'pdf/pdf_metrics.c')
-rw-r--r-- | pdf/pdf_metrics.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pdf/pdf_metrics.c b/pdf/pdf_metrics.c index 62353f9f..3aa0ef24 100644 --- a/pdf/pdf_metrics.c +++ b/pdf/pdf_metrics.c @@ -26,7 +26,7 @@ pdf_add_hmtx(fz_context *ctx, pdf_font_desc *font, int lo, int hi, int w) if (font->hmtx_len + 1 >= font->hmtx_cap) { font->hmtx_cap = font->hmtx_cap + 16; - font->hmtx = fz_realloc(ctx, font->hmtx, font->hmtx_cap * sizeof(pdf_hmtx)); + font->hmtx = fz_resize_array(ctx, font->hmtx, font->hmtx_cap, sizeof(pdf_hmtx)); } font->hmtx[font->hmtx_len].lo = lo; @@ -41,7 +41,7 @@ pdf_add_vmtx(fz_context *ctx, pdf_font_desc *font, int lo, int hi, int x, int y, if (font->vmtx_len + 1 >= font->vmtx_cap) { font->vmtx_cap = font->vmtx_cap + 16; - font->vmtx = fz_realloc(ctx, font->vmtx, font->vmtx_cap * sizeof(pdf_vmtx)); + font->vmtx = fz_resize_array(ctx, font->vmtx, font->vmtx_cap, sizeof(pdf_vmtx)); } font->vmtx[font->vmtx_len].lo = lo; |