[Fix] Fonts: off by one memory issue.

This commit is contained in:
Allanis 2013-05-15 22:39:11 +01:00
parent 1f5c05ac77
commit 2f3cae5b6b

View File

@ -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] =