[Fix] Fonts: off by one memory issue.
This commit is contained in:
parent
1f5c05ac77
commit
2f3cae5b6b
@ -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] =
|
||||
|
Loading…
Reference in New Issue
Block a user