Skip to content

Commit

Permalink
Add missing highscore digit
Browse files Browse the repository at this point in the history
Signed-off-by: Jed Lejosne <[email protected]>
  • Loading branch information
jean-edouard committed Jan 29, 2025
1 parent 4fb9e6f commit da9a9fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drifter.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ static void drifter_game_render_callback(Canvas* const canvas, void* ctx) {
if (drifter_state->score > drifter_state->highscore) {
canvas_draw_str(canvas, 0, 18, "New High Score!");
} else {
char msg[20];
snprintf(msg, 20, "High Score: %ld", drifter_state->highscore);
char msg[21];
snprintf(msg, 21, "High Score: %ld", drifter_state->highscore);
canvas_draw_str(canvas, 0, 18, msg);
}
}
Expand Down

0 comments on commit da9a9fc

Please sign in to comment.