Skip to content

Commit

Permalink
LoadFontDefault(): Initialize glyphs and recs to zero #4319
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Sep 22, 2024
1 parent 7d3f04c commit 1eb8ff5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rtext.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ extern void LoadFontDefault(void)

// Allocate space for our characters info data
// NOTE: This memory must be freed at end! --> Done by CloseWindow()
defaultFont.glyphs = (GlyphInfo *)RL_MALLOC(defaultFont.glyphCount*sizeof(GlyphInfo));
defaultFont.recs = (Rectangle *)RL_MALLOC(defaultFont.glyphCount*sizeof(Rectangle));
defaultFont.glyphs = (GlyphInfo *)RL_CALLOC(defaultFont.glyphCount, sizeof(GlyphInfo));
defaultFont.recs = (Rectangle *)RL_CALLOC(defaultFont.glyphCount, sizeof(Rectangle));

int currentLine = 0;
int currentPosX = charsDivisor;
Expand Down

0 comments on commit 1eb8ff5

Please sign in to comment.