From: H.G. Muller Date: Mon, 21 Oct 2013 20:38:53 +0000 (+0200) Subject: Fix sweep promotions X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=f74dde3c39e1bf046f28972c752113f6311314d8;p=xboard.git Fix sweep promotions We should not be able to select shogi-style promotion partners of other pieces, as there is no promotion suffix to indicate them. --- diff --git a/backend.c b/backend.c index 39ec535..b1a20ff 100644 --- a/backend.c +++ b/backend.c @@ -5328,6 +5328,7 @@ Sweep (int step) else if(promoSweep == WhiteKing && step > 0) promoSweep = BlackKing; if(!step) step = -1; } while(PieceToChar(promoSweep) == '.' || PieceToChar(promoSweep) == '~' || promoSweep == pawn || + !toggleFlag && PieceToChar(promoSweep) == '+' || // skip promoted versions of other appData.testLegality && (promoSweep == king || promoSweep == WhiteLion || promoSweep == BlackLion)); if(toX >= 0) { int victim = boards[currentMove][toY][toX];