From: H.G. Muller <h.g.muller@hccnet.nl>
Date: Sat, 13 Nov 2010 21:52:09 +0000 (+0100)
Subject: Fix acceptance of null-move with legality testing off
X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=4a538e46ba98f9cca1d9c156347e5bfc3952b160;p=xboard.git

Fix acceptance of null-move with legality testing off

A second click on the same piece was interpreted as a to-square rather
than deselection of the piece.
---

diff --git a/backend.c b/backend.c
index caaeabd..0026207 100644
--- a/backend.c
+++ b/backend.c
@@ -6439,8 +6439,9 @@ void LeftClick(ClickType clickType, int xPix, int yPix)
 		MarkTargetSquares(0);
 		DragPieceBegin(xPix, yPix);
 	    }
-	    return;
 	   }
+	   if(x == fromX && y == fromY) return; // if OnlyMove altered (x,y) we go on
+	   second = FALSE; 
 	}
 	// ignore clicks on holdings
 	if(x < BOARD_LEFT || x >= BOARD_RGHT) return;