From f74dde3c39e1bf046f28972c752113f6311314d8 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 21 Oct 2013 22:38:53 +0200 Subject: [PATCH] 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. --- backend.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 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]; -- 1.7.0.4