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.
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<BOARD_HEIGHT; r++) for(f=BOARD_LEFT; f<BOARD_RGHT; f++)