From 2f3cae5b6befb56ea810265eb788760bc79c4472 Mon Sep 17 00:00:00 2001 From: Allanis Date: Wed, 15 May 2013 22:39:11 +0100 Subject: [PATCH] [Fix] Fonts: off by one memory issue. --- src/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/font.c b/src/font.c index 3eef7c6..2506149 100644 --- a/src/font.c +++ b/src/font.c @@ -357,7 +357,7 @@ static void glFontMakeDList(FT_Face face, char ch, GLuint list_base, // Memory for textured data. // Bitmap is useing two channels, one for luminosity and one for alpha. - expanded_data = (GLubyte*)malloc(sizeof(GLubyte)*2*w*h); + expanded_data = (GLubyte*)malloc(sizeof(GLubyte)*2*w*h + 1); for(j = 0; j < h; j++) { for(i = 0; i < w; i++) { expanded_data[2*(i+j*w)] = expanded_data[2*(i+j*w)+1] =