From c4545166b97f99043e21f352e1439af355da5d32 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 4 Nov 2011 21:55:21 +0100 Subject: [PATCH] Accept setup command in variant fairy even with legality testing on Variant fairy does not really have a defined opening position, but lots of pieces defined, so we might want to play with legality checking on, but still rely on the engine for the opening position --- backend.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index aa326da..0b7f539 100644 --- a/backend.c +++ b/backend.c @@ -8118,7 +8118,8 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats. return; // [HGM] This return was missing, causing option features to be recognized as non-compliant commands! } - if (!appData.testLegality && !strncmp(message, "setup ", 6)) { // [HGM] allow first engine to define opening position + if ((!appData.testLegality || gameInfo.variant == VariantFairy) && + !strncmp(message, "setup ", 6)) { // [HGM] allow first engine to define opening position int dummy, s=6; char buf[MSG_SIZ]; if(appData.icsActive || forwardMostMove != 0 || cps != &first) return; if(sscanf(message, "setup (%s", buf) == 1) s = 8 + strlen(buf), buf[s-9] = NULLCHAR, SetCharTable(pieceToChar, buf); -- 1.7.0.4