diff options
Diffstat (limited to 'src/title.c')
-rw-r--r-- | src/title.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/title.c b/src/title.c index edafd22..71bf04a 100644 --- a/src/title.c +++ b/src/title.c @@ -54,7 +54,13 @@ static void order_leaderboard() { Top10[i].Score = TmpStore[i]->Score; } // Free TmpStore - free(*TmpStore); //Truth be told, I dunno if this even works, since the amount of memory used is kilobytes... + for(int i = 0; i < (UINT16_MAX*2); i++) + free(TmpStore[i]); //Truth be told, I dunno if this even works, since the amount of memory used is kilobytes... + + // Close leaderboard file. + if (LeaderboardFile != NULL) { + fclose(LeaderboardFile); + } return; } @@ -282,7 +288,7 @@ int title_screen() { goto skip; } char LeaderboardText[1024]; - for (int i = 1; i <= 9; i++) { + for (int i = 1; i <= 10; i++) { if(Top10[i-1].Name[0] != ' ') { snprintf(LeaderboardText, sizeof(LeaderboardText), "%d: %s : %d", i, Top10[i-1].Name, Top10[i-1].Score); DrawText(LeaderboardText, 600, 50*i, 48, WHITE); |