From 49adc4e267b0f7b7e7c0a824e8cbe6f2196a6e9e Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 26 Jun 2019 00:31:20 -0700 Subject: [PATCH] Order correctly and include z_zone.h --- src/font.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/font.c b/src/font.c index 7207def62..aeaabd018 100644 --- a/src/font.c +++ b/src/font.c @@ -13,6 +13,7 @@ #include "doomdef.h" #include "hu_stuff.h" #include "font.h" +#include "z_zone.h" font_t fontv[MAX_FONTS]; int fontc; @@ -28,8 +29,8 @@ FontCache (font_t *fnt) { fnt->font[i] = HU_CachePatch( "%s%.*d", - fnt->digits, fnt->prefix, + fnt->digits, c); } } @@ -54,11 +55,11 @@ Font_DumbRegister (const font_t *sfnt) fnt = &fontv[fontc]; + memcpy(fnt, sfnt, sizeof (font_t)); + if (!( fnt->font = ZZ_Alloc(sfnt->size * sizeof (patch_t *)) )) return -1; - memcpy(fnt, sfnt, sizeof (font_t)); - return fontc++; }