From afd156a1044364cc19d92b6c84e5d2ea030a9066 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Thu, 7 Mar 2013 18:11:31 +0100 Subject: [PATCH] Provide compatibility with Alien Edition setup command The setup command of the Alien Edition has a board-size specifier (possibly as prefix on a parent-variant name) between pieceToCharTable and FEN. The regular version would choke on that, precluding engines designed for the Alien protocol extension to have their setup processed when running under regular XBoard. This patch makes it skip the extra info. --- backend.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/backend.c b/backend.c index b3c152e..4af9b0a 100644 --- a/backend.c +++ b/backend.c @@ -8436,6 +8436,7 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats. 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; + if(sscanf(message+s, "%dx%d+%d", &dummy, &dummy, &dummy) == 3) while(message[s] && message[s++] != ' '); // for compatibility with Alien Edition ParseFEN(boards[0], &dummy, message+s); DrawPosition(TRUE, boards[0]); startedFromSetupPosition = TRUE; -- 1.7.0.4