From 76f00fe84ad4ba61b6eb39f374d32bde5714b9c0 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 27 Feb 2010 17:36:10 +0100 Subject: [PATCH] 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. --- backend.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) 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 -- 1.7.0.4