Restrict use of a2a3 kludge
authorH.G. Muller <h.g.muller@hccnet.nl>
Sat, 6 Nov 2010 13:19:56 +0000 (14:19 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Tue, 9 Nov 2010 14:01:30 +0000 (15:01 +0100)
The kudge to send "a2a3" in stead of "black" to get black to move is
fatally flawed in varants that have no Pawn on a2. So in that case we
revert to use of the deprecated "black" command.

backend.c

index de835ae..9bad36b 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -5595,7 +5595,8 @@ SendBoard(cps, moveNum)
       /* Kludge to set black to move, avoiding the troublesome and now
        * deprecated "black" command.
        */
-      if (!WhiteOnMove(moveNum)) SendToProgram("a2a3\n", cps);
+      if (!WhiteOnMove(moveNum)) // [HGM] but better a deprecated command than an illegal move...
+        SendToProgram(boards[0][1][BOARD_LEFT] == WhitePawn ? "a2a3\n" : "black\n", cps);
 
       SendToProgram("edit\n", cps);
       SendToProgram("#\n", cps);