From: H.G. Muller Date: Fri, 4 Nov 2011 20:52:20 +0000 (+0100) Subject: Set pieceToCharTable by setup command even when ignoring FEN X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=221a2525b957fa3b8d14687dedfb2bf0e409122a;p=xboard.git Set pieceToCharTable by setup command even when ignoring FEN When the user starts from a set-up position, the egines default openingposition has to be ignored, but the pieceToCharTable would still be relevant. --- diff --git a/backend.c b/backend.c index 2f71b5e..aa326da 100644 --- a/backend.c +++ b/backend.c @@ -8120,8 +8120,9 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats. if (!appData.testLegality && !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 || startedFromSetupPosition) return; + 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); + if(startedFromSetupPosition) return; ParseFEN(boards[0], &dummy, message+s); DrawPosition(TRUE, boards[0]); startedFromSetupPosition = TRUE;