From adbd00423d43ae48eaab4bb21183284c93d6b20b Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 2 Feb 2016 13:10:24 +0100 Subject: [PATCH] Fix setting default piece from 'choice' command PieceToCharwas used instead of CharToPiece. In addition it is important to deduce the color from currentMoe rather than forwardMostMove, as one could be entering a move in the middle of a game (e.g. when editing or starting a variation). --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index da945a6..c2a5bfc 100644 --- a/backend.c +++ b/backend.c @@ -9084,7 +9084,7 @@ FakeBookMove: // [HGM] book: we jump here to simulate machine moves after book h return; } if(sscanf(message, "choice %s", promoRestrict) == 1 && promoSweep != EmptySquare) { - promoSweep = PieceToChar(forwardMostMove&1 ? ToLower(*promoRestrict) : ToUpper(*promoRestrict)); + promoSweep = CharToPiece(currentMove&1 ? ToLower(*promoRestrict) : ToUpper(*promoRestrict)); Sweep(0); return; } -- 1.7.0.4