From: H.G.Muller Date: Tue, 7 Oct 2014 18:55:00 +0000 (+0200) Subject: Fix engine-defined variant as startup X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=c1115828b95f029c8623c0af540a6c4fcdc34f39;p=xboard.git Fix engine-defined variant as startup Non-standard names were all recognized as 'normal' in InitBackend1(). Now if the -variant argument was not "normal", it is assumed to be an engine-defined variant if we run with engine. --- diff --git a/backend.c b/backend.c index 315bd8e..faf0b54 100644 --- a/backend.c +++ b/backend.c @@ -1201,6 +1201,11 @@ InitBackEnd1 () DisplayFatalError(buf, 0, 2); return; + case VariantNormal: /* definitely works! */ + if(strcmp(appData.variant, "normal") && appData.chessProgram) { // [HGM] hope this is an engine-defined variant + safeStrCpy(engineVariant, appData.variant, MSG_SIZ); + return; + } case VariantXiangqi: /* [HGM] repetition rules not implemented */ case VariantFairy: /* [HGM] TestLegality definitely off! */ case VariantGothic: /* [HGM] should work */ @@ -1213,7 +1218,6 @@ InitBackEnd1 () case VariantFalcon: /* [HGM] untested */ case VariantCrazyhouse: /* holdings not shown, ([HGM] fixed that!) offboard interposition not understood */ - case VariantNormal: /* definitely works! */ case VariantWildCastle: /* pieces not automatically shuffled */ case VariantNoCastle: /* pieces not automatically shuffled */ case VariantFischeRandom: /* [HGM] works and shuffles pieces */