Remove validity test on promochar from parser
authorH.G. Muller <h.g.muller@hccnet.nl>
Mon, 1 Nov 2010 18:23:43 +0000 (19:23 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Tue, 9 Nov 2010 13:42:05 +0000 (14:42 +0100)
The backend routines Disambiguate() and LegalityTest() will catch
invalid promotions, so no need to do it here.

parser.l

index 17d7915..6dcd13b 100644 (file)
--- a/parser.l
+++ b/parser.l
@@ -527,8 +527,6 @@ extern void CopyBoard P((Board to, Board from));
        else
           c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
        currentMoveString[5] = NULLCHAR;
        else
           c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
        currentMoveString[5] = NULLCHAR;
-        if(c != '=' && c != '+' && CharToPiece(c) == EmptySquare)
-            return ImpossibleMove;
         if(c == '+' && gameInfo.variant != VariantShogi) c = currentMoveString[4] = NULLCHAR; // + means check outside Shogi
     } else {
        currentMoveString[4] = NULLCHAR;
         if(c == '+' && gameInfo.variant != VariantShogi) c = currentMoveString[4] = NULLCHAR; // + means check outside Shogi
     } else {
        currentMoveString[4] = NULLCHAR;