From: H.G. Muller Date: Sat, 27 Feb 2010 16:36:10 +0000 (+0100) Subject: Remake programVersion string after receiving engine features X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=76f00fe84ad4ba61b6eb39f374d32bde5714b9c0;p=xboard.git Remake programVersion string after receiving engine features The engine could have sent a more accurate version of its own name than the one derived from the exe filename in a myname feature, and we better use that in the programVersion string, which will be sent as interface name to the ICS. --- diff --git a/backend.c b/backend.c index 9083ba9..01721f0 100644 --- a/backend.c +++ b/backend.c @@ -1107,6 +1107,11 @@ InitBackEnd3 P((void)) InitChessProgram(&first, startedFromSetupPosition); + if(!appData.noChessProgram) { /* [HGM] tidy: redo program version to use name from myname feature */ + free(programVersion); + programVersion = (char*) malloc(8 + strlen(PACKAGE_STRING) + strlen(first.tidy)); + sprintf(programVersion, "%s + %s", PACKAGE_STRING, first.tidy); + } if (appData.icsActive) { #ifdef WIN32