From: H.G. Muller Date: Tue, 17 Jan 2012 21:22:32 +0000 (+0100) Subject: Reset protocol version before loading new engine X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=3ba96d80b42bb16b32f9ba305028840bacdb9cc7;p=xboard.git Reset protocol version before loading new engine The protocol version was not reset, so if the previous engine was v1, the newly loaded engine would not be sent a protover command, so that its features would remain unknown! --- diff --git a/backend.c b/backend.c index e062eff..c54a29b 100644 --- a/backend.c +++ b/backend.c @@ -880,6 +880,7 @@ Load (ChessProgramState *cps, int i) snprintf(buf, MSG_SIZ, "-fcp %s", engineLine); SwapEngines(i); // kludge to parse -f* / -first* like it is -s* / -second* ParseArgsFromString(resetOptions); appData.fenOverride[0] = NULL; appData.pvSAN[0] = FALSE; + appData.firstProtocolVersion = PROTOVER; ParseArgsFromString(buf); SwapEngines(i); ReplaceEngine(cps, i); @@ -9911,7 +9912,7 @@ SetPlayer (int player) if(mnemonic[i]) { snprintf(buf, MSG_SIZ, "-fcp %s", command[i]); ParseArgsFromString(resetOptions); appData.fenOverride[0] = NULL; appData.pvSAN[0] = FALSE; - appData.firstHasOwnBookUCI = !appData.defNoBook; + appData.firstHasOwnBookUCI = !appData.defNoBook; appData.protocolVersion[0] = PROTOVER; ParseArgsFromString(buf); } free(engineName);