diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-11-23 23:50:44 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-11-23 23:50:44 +0100 |
commit | c708ab6a54aefcf8629f3a6d586123ec7737a2e5 (patch) | |
tree | 3c451920470f98cbd6acb82a0b8c544b2d692c5b /FICS/gamedb.c | |
parent | 239e9ec4a845f6473444bbf9a88dbc400bd1b2b3 (diff) |
Fixed bug
Diffstat (limited to 'FICS/gamedb.c')
-rw-r--r-- | FICS/gamedb.c | 8 |
1 files changed, 6 insertions, 2 deletions
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); |