When white was to move, the stm was just keeping its previous value,
which could very well have been BLACK.
Sync(PAUSE); // wait for uciok\r
}\r
else if(!strcmp(command, "setboard")) {\r
- if(strstr(line+9, " b ")) stm = BLACK;\r
+ stm = (strstr(line+9, " b ") ? BLACK : WHITE);\r
if(p = strchr(line+9, '[')) { char c;\r
*p++ = 0; q = strchr(p, ']'); *q = 0; r = q + 4; \r
if(sc == 's') q[2] = 'w' + 'b' - q[2], strcpy(r=q+3, " 1\n"); // Shogi: reverse color\r