From 13e03bda5c89c4457bc599bae34110b6bc76aba5 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 27 Sep 2009 12:10:38 -0700 Subject: [PATCH] added the result comment to the game-list tags when the game list is exported to the clipboard --- gamelist.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gamelist.c b/gamelist.c index 0a4979e..7775a99 100644 --- a/gamelist.c +++ b/gamelist.c @@ -343,7 +343,7 @@ GameListLineOld(number, gameInfo) return ret; } -#define MAX_FIELD_LEN 64 /* To avoid overflowing the buffer */ +#define MAX_FIELD_LEN 80 /* To avoid overflowing the buffer */ char * GameListLine( int number, GameInfo * gameInfo ) { @@ -431,12 +431,14 @@ char * GameListLineFull( int number, GameInfo * gameInfo ) char * round = gameInfo->round ? gameInfo->round : "?"; char * date = gameInfo->date ? gameInfo->date : "?"; char * oob = gameInfo->outOfBook ? gameInfo->outOfBook : ""; + char * reason = gameInfo->resultDetails ? gameInfo->resultDetails : ""; - int len = 64 + strlen(event) + strlen(site) + strlen(white) + strlen(black) + strlen(date) + strlen(oob); + int len = 64 + strlen(event) + strlen(site) + strlen(white) + strlen(black) + strlen(date) + strlen(oob) + strlen(reason); char *ret = (char *) malloc(len); - sprintf(ret, "%d, \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\"", number, event, site, round, white, black, PGNResult(gameInfo->result), date, oob ); + sprintf(ret, "%d, \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\"", + number, event, site, round, white, black, PGNResult(gameInfo->result), reason, date, oob ); return ret; } -- 1.7.0.4