Fixed malloc with 0 size.
This commit is contained in:
parent
d83af81295
commit
30ea9f5056
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user