fix bug in bughouse drop menu
authorH.G. Muller <h.g.muller@hccnet.nl>
Sun, 22 Nov 2009 20:15:15 +0000 (12:15 -0800)
committerArun Persaud <arun@nubati.net>
Sun, 22 Nov 2009 20:15:15 +0000 (12:15 -0800)
This patch fixes the bughouse drop menu, which was broken by the
new mouse driver, and could no longer drop white Pawns.

backend.c

index 4208beb..9a95466 100755 (executable)
--- a/backend.c
+++ b/backend.c
@@ -5346,7 +5346,7 @@ FinishMove(moveType, fromX, fromY, toX, toY, promoChar)
         moveType = PromoCharToMoveType(WhiteOnMove(currentMove), promoChar);
 
     /* [HGM] convert drag-and-drop piece drops to standard form */
-    if( fromX == BOARD_LEFT-2 || fromX == BOARD_RGHT+1) {
+    if( (fromX == BOARD_LEFT-2 || fromX == BOARD_RGHT+1) && fromY != DROP_RANK ){
          moveType = WhiteOnMove(currentMove) ? WhiteDrop : BlackDrop;
           if(appData.debugMode) fprintf(debugFP, "Drop move %d, curr=%d, x=%d,y=%d, p=%d\n", 
                moveType, currentMove, fromX, fromY, boards[currentMove][fromY][fromX]);