Corrected issue with VS
This commit is contained in:
parent
7fbd821727
commit
ed387d00aa
@ -859,7 +859,7 @@ static SpriteFont LoadTTF(const char *fileName, int fontSize, int firstChar, int
|
|||||||
|
|
||||||
unsigned char *ttfBuffer = (unsigned char *)malloc(1 << 25);
|
unsigned char *ttfBuffer = (unsigned char *)malloc(1 << 25);
|
||||||
unsigned char *dataBitmap = (unsigned char *)malloc(FONT_TEXTURE_WIDTH*FONT_TEXTURE_HEIGHT*sizeof(unsigned char)); // One channel bitmap returned!
|
unsigned char *dataBitmap = (unsigned char *)malloc(FONT_TEXTURE_WIDTH*FONT_TEXTURE_HEIGHT*sizeof(unsigned char)); // One channel bitmap returned!
|
||||||
stbtt_bakedchar charData[numChars];
|
stbtt_bakedchar *charData = (stbtt_bakedchar *)malloc(sizeof(stbtt_bakedchar)*numChars);
|
||||||
|
|
||||||
SpriteFont font = { 0 };
|
SpriteFont font = { 0 };
|
||||||
|
|
||||||
@ -923,5 +923,7 @@ static SpriteFont LoadTTF(const char *fileName, int fontSize, int firstChar, int
|
|||||||
font.charAdvanceX[i] = (int)charData[i].xadvance;
|
font.charAdvanceX[i] = (int)charData[i].xadvance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(charData);
|
||||||
|
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user