Fixed malloc with 0 size.

This commit is contained in:
Armin Novak 2015-06-23 12:12:59 +02:00
parent d83af81295
commit 30ea9f5056

View File

@ -404,6 +404,8 @@ int rdtk_font_parse_descriptor_buffer(rdtkFont* font, BYTE* buffer, int size)
}
font->glyphCount = count;
font->glyphs = NULL;
if (count > 0)
font->glyphs = (rdtkGlyph*) calloc(font->glyphCount, sizeof(rdtkGlyph));
if (!font->glyphs)