From e5c9689d08795346b17323faa1015cd8aca2bf74 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sat, 6 Jan 2024 11:22:28 +0100 Subject: not_pawn: replaced sprintf() calls --- FICS/algcheck.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'FICS/algcheck.c') diff --git a/FICS/algcheck.c b/FICS/algcheck.c index 166051b..742560f 100644 --- a/FICS/algcheck.c +++ b/FICS/algcheck.c @@ -401,13 +401,13 @@ not_pawn(game_state_t *gs, move_t *mt, game_state_t *fakeMove, const int piece, */ if (f_ambig == 0) { - sprintf(tmp, "%c", (mt->fromFile + 'a')); + snprintf(tmp, tmp_size, "%c", (mt->fromFile + 'a')); strcat(mStr, tmp); } else if (r_ambig == 0) { - sprintf(tmp, "%d", (mt->fromRank + 1)); + snprintf(tmp, tmp_size, "%d", (mt->fromRank + 1)); strcat(mStr, tmp); } else { - sprintf(tmp, "%c%d", + snprintf(tmp, tmp_size, "%c%d", (mt->fromFile + 'a'), (mt->fromRank + 1)); strcat(mStr, tmp); -- cgit v1.2.3