X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=71aa6a529feed9b1712e7f3e0e2e51c47361a7cc;hb=b9fd60495d47ef08fbff17ae883ae69d37fcb859;hp=43e50eb75680aed096457f679467608b5fc07f30;hpb=32fe9f84d050e0fcc12d38ae9c9ac2fd6014cc12;p=xboard.git diff --git a/backend.c b/backend.c index 43e50eb..71aa6a5 100644 --- a/backend.c +++ b/backend.c @@ -9420,9 +9420,8 @@ MakeMove(fromX, fromY, toX, toY, promoChar) fflush(serverMoves); } - if (forwardMostMove+1 > framePtr) { // [HGM] vari: do not run into saved variations - DisplayFatalError(_("Game too long; increase MAX_MOVES and recompile"), - 0, 1); + if (forwardMostMove+1 > framePtr) { // [HGM] vari: do not run into saved variations.. + GameEnds(GameUnfinished, _("Game too long; increase MAX_MOVES and recompile"), GE_XBOARD); return; } UnLoadPV(); // [HGM] pv: if we are looking at a PV, abort this @@ -10053,7 +10052,7 @@ NextTourneyGame(int nr, int *swapColors) void NextMatchGame() { // performs game initialization that does not invoke engines, and then tries to start the game - int firstWhite, swapColors = 0; + int res, firstWhite, swapColors = 0; if(!NextTourneyGame(nextGame, &swapColors)) return; // this sets matchGame, -fcp / -scp and other options for next game, if needed firstWhite = appData.firstPlaysBlack ^ (matchGame & 1 | appData.sameColorGames > 1); // non-incremental default firstWhite ^= swapColors; // reverses if NextTourneyGame says we are in an odd round @@ -10062,8 +10061,9 @@ NextMatchGame() appData.noChessProgram = (first.pr == NoProc); // kludge to prevent Reset from starting up chess program if(appData.loadGameIndex == -2) srandom(appData.seedBase + 68163*(nextGame & ~1)); // deterministic seed to force same opening Reset(FALSE, first.pr != NoProc); - appData.noChessProgram = FALSE; - if(!LoadGameOrPosition(matchGame)) return; // setup game; abort when bad game/pos file + res = LoadGameOrPosition(matchGame); // setup game + appData.noChessProgram = FALSE; // LoadGameOrPosition might call Reset too! + if(!res) return; // abort when bad game/pos file TwoMachinesEvent(); }