From c708ab6a54aefcf8629f3a6d586123ec7737a2e5 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sat, 23 Nov 2024 23:50:44 +0100 Subject: Fixed bug --- FICS/gamedb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'FICS') diff --git a/FICS/gamedb.c b/FICS/gamedb.c index db99f14..15fe9ce 100644 --- a/FICS/gamedb.c +++ b/FICS/gamedb.c @@ -652,8 +652,12 @@ movesToString(int g, int pgn) mstrlcat(gameString, tmp, sizeof gameString); mstrlcat(gameString, "--- ", sizeof gameString); - mstrlcat(gameString, (char *) (localtime(&curTime)), - sizeof gameString); // XXX + + if ((tm_ptr = localtime(&curTime)) != NULL) { + strftime(tmp, sizeof tmp, "%Y.%m.%d %H:%M:%S", tm_ptr); + mstrlcat(gameString, tmp, sizeof gameString); + } else + warn("%s: localtime", __func__); if (garray[g].rated) { mstrlcat(gameString, "\nRated ", sizeof gameString); -- cgit v1.2.3