aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/movecheck.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-17 14:26:16 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-17 14:26:16 +0100
commit9d48138ed9c66421657f4f2517a7886f46dd295f (patch)
tree69eb6b9fda4d6d61c07937e9d63a32cd172b2546 /FICS/movecheck.c
parent91e3d3910a78d9c50270b94449c86eb2c776703e (diff)
Replaced sprintf() with snprintf()
Diffstat (limited to 'FICS/movecheck.c')
-rw-r--r--FICS/movecheck.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/FICS/movecheck.c b/FICS/movecheck.c
index 453bdee..ea6569b 100644
--- a/FICS/movecheck.c
+++ b/FICS/movecheck.c
@@ -720,7 +720,8 @@ move_calculate(game_state_t *gs, move_t *mt, int promote)
}
// Replace this with an algabraic de-parser
- sprintf(mt->algString, alg_unparse(gs, mt));
+ snprintf(mt->algString, sizeof mt->algString, "%s",
+ alg_unparse(gs, mt));
fakeMove = *gs;
execute_move(&fakeMove, mt, 0); // Calculates enPassant also