From 7b47c6cf36837dd13fab9a31d4156acc8cd670d3 Mon Sep 17 00:00:00 2001 From: morturp Date: Thu, 18 Jul 2013 03:00:39 +0300 Subject: [PATCH] out seems to be unnecessarily large for one byte per pixel --- code/renderercommon/tr_font.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/renderercommon/tr_font.c b/code/renderercommon/tr_font.c index dda00e24ac..4b641bac4a 100644 --- a/code/renderercommon/tr_font.c +++ b/code/renderercommon/tr_font.c @@ -436,12 +436,12 @@ void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) { // make a 256x256 image buffer, once it is full, register it, clean it and keep going // until all glyphs are rendered - out = ri.Malloc(1024*1024); + out = ri.Malloc(256*256); if (out == NULL) { ri.Printf(PRINT_WARNING, "RE_RegisterFont: ri.Malloc failure during output image creation.\n"); return; } - Com_Memset(out, 0, 1024*1024); + Com_Memset(out, 0, 256*256); maxHeight = 0; @@ -500,7 +500,7 @@ void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) { Q_strncpyz(font->glyphs[j].shaderName, name, sizeof(font->glyphs[j].shaderName)); } lastStart = i; - Com_Memset(out, 0, 1024*1024); + Com_Memset(out, 0, 256*256); xOut = 0; yOut = 0; ri.Free(imageBuff);