From 2f639b510cfc1a6f686919baa024bd7613f9a095 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Thu, 14 Apr 2011 12:31:15 +0200 Subject: [PATCH] Fix sweep-promotions patch Setting of the from square was moved to before OKtoStartUserMove in the LeftClick handler, to make sure we could test the promotion possiblity when OnlyMove() would have altered (x,y) to be no longer the from square. But this setting of fromX, fromY hung on also if the move was not OK, so you could effectively select opponent pieces and empty squares. The from-square is now set back to undefined when it is not OK to move the piece you clicked. --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index 1165932..9f9f63e 100644 --- a/backend.c +++ b/backend.c @@ -6541,7 +6541,7 @@ void LeftClick(ClickType clickType, int xPix, int yPix) if (appData.highlightDragging) { SetHighlights(fromX, fromY, -1, -1); } - } + } else fromX = fromY = -1; return; } } -- 1.7.0.4