From 3ba96d80b42bb16b32f9ba305028840bacdb9cc7 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 17 Jan 2012 22:22:32 +0100 Subject: [PATCH] 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! --- backend.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 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); -- 1.7.0.4