From b8f6d0ac5bc2880413756e9a6b536c0d671a1c7e Mon Sep 17 00:00:00 2001
From: Markus Uhlin <markus@nifty-networks.net>
Date: Sat, 6 Jan 2024 11:24:43 +0100
Subject: Replaced sprintf() calls

---
 FICS/algcheck.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/FICS/algcheck.c b/FICS/algcheck.c
index 742560f..c42f880 100644
--- a/FICS/algcheck.c
+++ b/FICS/algcheck.c
@@ -451,7 +451,7 @@ alg_unparse(game_state_t *gs, move_t *mt)
 		if (mt->fromFile == ALG_DROP) {
 			strcpy(mStr,"P");
 		} else if (mt->fromFile != mt->toFile) {
-			sprintf(tmp, "%c", (mt->fromFile + 'a'));
+			snprintf(tmp, sizeof tmp, "%c", (mt->fromFile + 'a'));
 			strcpy(mStr, tmp);
 		}
 		break;
@@ -493,7 +493,7 @@ alg_unparse(game_state_t *gs, move_t *mt)
 			strcat(mStr, "x");
 	}
 
-	sprintf(tmp, "%c%d", (mt->toFile + 'a'), (mt->toRank + 1));
+	snprintf(tmp, sizeof tmp, "%c%d", (mt->toFile + 'a'), (mt->toRank + 1));
 	strcat(mStr, tmp);
 
 	if (piece == PAWN && mt->piecePromotionTo != NOPIECE) {
-- 
cgit v1.2.3