From 221a2525b957fa3b8d14687dedfb2bf0e409122a Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 4 Nov 2011 21:52:20 +0100 Subject: [PATCH] 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. --- backend.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 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; -- 1.7.0.4