X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=moves.c;h=978d8958651ef7dd4f23d996c5dc44efaee458b1;hb=e9ab870ddf0840e4206da403934d97019d28e36b;hp=fba01a726308889f1439cd4e9170c40ce1081652;hpb=81a640a52b1e72cc1d26d9d85a6644ffb933b06c;p=xboard.git diff --git a/moves.c b/moves.c index fba01a7..978d895 100644 --- a/moves.c +++ b/moves.c @@ -1764,6 +1764,10 @@ Disambiguate (Board board, int flags, DisambiguateClosure *closure) else c = PieceToChar(BlackQueen); } else if(c == '=') closure->kind = IllegalMove; // no deferral outside Shogi + } else if (c == '+') { // '+' outside shogi, check if pieceToCharTable enabled it + ChessSquare p = closure->piece; + if(p > WhiteMan && p < BlackPawn || p > BlackMan || PieceToChar(PROMOTED p) != '+') + closure->kind = ImpossibleMove; // used on non-promotable piece } else if (c != NULLCHAR) closure->kind = IllegalMove; closure->promoChar = ToLower(c); // this can be NULLCHAR! Note we keep original promoChar even if illegal.