From 8f331d8de1bad648f7a7069b8d0da3697f723e3d Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 13 Apr 2012 00:33:28 +0200 Subject: [PATCH] Fix click-click sweep promotions to empty square These did not work, because DragPieceBegin would fail on an EmptySquare. --- backend.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/backend.c b/backend.c index bd2a2c7..a2ff648 100644 --- a/backend.c +++ b/backend.c @@ -7190,7 +7190,10 @@ LeftClick (ClickType clickType, int xPix, int yPix) if(HasPromotionChoice(fromX, fromY, toX, toY, &promoChoice, FALSE)) { if(appData.sweepSelect) { ChessSquare piece = boards[currentMove][fromY][fromX]; + ChessSquare victim = boards[currentMove][toY][toX]; + boards[currentMove][toY][toX] = piece; // kludge: make sure there is something to grab for drag DragPieceBegin(xPix, yPix, TRUE); dragging = 1; + boards[currentMove][toY][toX] = victim; promoSweep = defaultPromoChoice; if(PieceToChar(PROMOTED piece) == '+') promoSweep = PROMOTED piece; selectFlag = 0; lastX = xPix; lastY = yPix; -- 1.7.0.4