From 19ba39ea3fba5ff50a6624575b262db203ada9d4 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 17 Apr 2012 10:51:02 +0200 Subject: [PATCH 1/1] Fix second-engine variant test The test whether the second engine supports the selected variant took place before the second engine was loaded, thus always coming to the conclusion that the variant was not supported, and aborting the TwoMachines command. The test is now moved to after second-engine loading (but before its initialization, where non-supporting would become a fatal error). --- backend.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/backend.c b/backend.c index 14563fa..0a8b682 100644 --- a/backend.c +++ b/backend.c @@ -13602,11 +13602,6 @@ TwoMachinesEvent P((void)) if (appData.noChessProgram) return; - if(second.protocolVersion >= 2 && !strstr(second.variants, VariantName(gameInfo.variant))) { - DisplayError("second engine does not play this", 0); - return; - } - switch (gameMode) { case TwoMachinesPlay: return; @@ -13645,6 +13640,12 @@ TwoMachinesEvent P((void)) ScheduleDelayedEvent(TwoMachinesEventIfReady, 10); return; } + + if(second.protocolVersion >= 2 && !strstr(second.variants, VariantName(gameInfo.variant))) { + DisplayError("second engine does not play this", 0); + return; + } + if(!stalling) { InitChessProgram(&second, FALSE); // unbalances ping of second engine SendToProgram("force\n", &second); -- 1.7.0.4