From 94a0acbcf696ce1aee4fb48537819c6c24d16c88 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 26 Jul 2016 22:04:14 +0200 Subject: [PATCH] Fix setting up btm positions with 'edit' The kludge to put black on move through a2a3 only works when there is a (normally moving) Pawn on a2. Otherwise the 'black' command has to be used. But this did take the engine out of force mode. So now we send another 'force' command after this 'black'. --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index 48695ad..5c37e3e 100644 --- a/backend.c +++ b/backend.c @@ -6498,7 +6498,7 @@ SendBoard (ChessProgramState *cps, int moveNum) * deprecated "black" command. */ 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(boards[0][1][BOARD_LEFT] == WhitePawn && !pieceDesc[WhitePawn] ? "a2a3\n" : "black\nforce\n", cps); if(!cps->extendedEdit) left = BOARD_LEFT, right = BOARD_RGHT; // only board proper -- 1.7.0.4