From 688dda3c0b49ceb1144cdedbdbdf1d70bd1747cd Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 10 Feb 2012 20:51:41 +0100 Subject: [PATCH] Fix unloading of first engine on tourney start Because NextTourneyGame was loading a new engine before ReserveGame was called to unload it with dummy game nr = -1), the first engine proc kept hanging. --- backend.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend.c b/backend.c index e931764..2b879fe 100644 --- a/backend.c +++ b/backend.c @@ -10047,11 +10047,11 @@ NextTourneyGame (int nr, int *swapColors) matchGame = 1; roundNr = nr / syncInterval + 1; } - if(first.pr != NoProc && second.pr != NoProc) return 1; // engines already loaded + if(first.pr != NoProc && second.pr != NoProc || nr<0) return 1; // engines already loaded // redefine engines, engine dir, etc. NamesToList(firstChessProgramNames, command, mnemonic, "all"); // get mnemonics of installed engines - if(first.pr == NoProc || nr < 0) { + if(first.pr == NoProc) { SetPlayer(whitePlayer, appData.participants); // find white player amongst it, and parse its engine line InitEngine(&first, 0); // initialize ChessProgramStates based on new settings. } -- 1.7.0.4