From f667c02d582c1a09d2a2f5e0b048fdb13c072777 Mon Sep 17 00:00:00 2001 From: "H.G.Muller" Date: Sat, 21 Feb 2015 20:08:00 +0100 Subject: [PATCH] Do not call illegal moves ambiguos When legality testing is off, an illegal SAN move would be interpreted as if the mentioned piece type could move anywhere, which lead to an 'Ambiguous Move' message if there were multiple pieces of that type. This should not be done if the piece moves are known through engine piece commands. --- moves.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moves.c b/moves.c index 88bbdee9..5c265a69 100644 --- a/moves.c +++ b/moves.c @@ -2031,7 +2031,7 @@ Disambiguate (Board board, int flags, DisambiguateClosure *closure) GenLegal(board, flags|F_IGNORE_CHECK, DisambiguateCallback, (VOIDSTAR) closure, closure->pieceIn); if (closure->count == 0) { /* No, it's not even that */ - if(!appData.testLegality && closure->pieceIn != EmptySquare) { + if(!appData.testLegality && !pieceDefs && closure->pieceIn != EmptySquare) { int f, r; // if there is only a single piece of the requested type on the board, use that closure->rt = closure->rtIn, closure->ft = closure->ftIn; for(r=0; r