From: H.G.Muller Date: Mon, 27 Oct 2014 22:46:39 +0000 (+0100) Subject: Fix extracting side-to-move from setboard command X-Git-Tag: v2.0~23 X-Git-Url: http://winboard.nl/cgi-bin?p=uci2wb.git;a=commitdiff_plain;h=2ce85eeb80b638776c971733316052337ea363b0 Fix extracting side-to-move from setboard command When white was to move, the stm was just keeping its previous value, which could very well have been BLACK. --- diff --git a/UCI2WB.c b/UCI2WB.c index 3035c94..b92e975 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -369,7 +369,7 @@ GUI2Engine() Sync(PAUSE); // wait for uciok } else if(!strcmp(command, "setboard")) { - if(strstr(line+9, " b ")) stm = BLACK; + stm = (strstr(line+9, " b ") ? BLACK : WHITE); if(p = strchr(line+9, '[')) { char c; *p++ = 0; q = strchr(p, ']'); *q = 0; r = q + 4; if(sc == 's') q[2] = 'w' + 'b' - q[2], strcpy(r=q+3, " 1\n"); // Shogi: reverse color