diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-01-06 11:24:43 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-01-06 11:24:43 +0100 |
commit | b8f6d0ac5bc2880413756e9a6b536c0d671a1c7e (patch) | |
tree | 85bad3966fba08372101ad5a4e4bc5135cf449d3 /FICS/algcheck.c | |
parent | e5c9689d08795346b17323faa1015cd8aca2bf74 (diff) |
Replaced sprintf() calls
Diffstat (limited to 'FICS/algcheck.c')
-rw-r--r-- | FICS/algcheck.c | 4 |
1 files 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) { |