Skip to content

Commit

Permalink
Merge pull request #20 from jouae/main
Browse files Browse the repository at this point in the history
Replace sprintf with snprintf
  • Loading branch information
jserv authored Jul 27, 2024
2 parents 2cfba0f + 07b3bf8 commit 015045c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/font-edit/twin-fedit.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ static void draw_char(char_t *c)
cairo_set_source_rgb(cr, 0, .5, .5);

cairo_move_to(cr, tx - 2, ty + 3);
sprintf(buf, "%d", i);
snprintf(buf, sizeof(buf) + 1, "%d", i);
cairo_show_text(cr, buf);
cairo_restore(cr);
}
Expand Down

0 comments on commit 015045c

Please sign in to comment.