From: H.G.Muller Date: Sat, 21 Feb 2015 19:08:00 +0000 (+0100) Subject: Do not call illegal moves ambiguos X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=f667c02d582c1a09d2a2f5e0b048fdb13c072777;p=xboard.git 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. --- diff --git a/moves.c b/moves.c index 88bbdee..5c265a6 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