X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=parser.l;h=9590fe23eb6d0aeaa987645302c60c242519466e;hb=7d36b24250db61fe2fd46465d7685ce008f7d546;hp=528b3de7aaf1661728d8e876d4708b36ef0edb61;hpb=72c1bad914f957ae8f646aa29aa7ba932394ec8a;p=xboard.git diff --git a/parser.l b/parser.l index 528b3de..9590fe2 100644 --- a/parser.l +++ b/parser.l @@ -824,7 +824,7 @@ extern void CopyBoard P((Board to, Board from)); } [A-Z][@*][a-l][0-9] { - /* Bughouse piece drop. No legality checking for now. */ + /* Bughouse piece drop. */ currentMoveString[1] = '@'; currentMoveString[2] = yytext[2]; currentMoveString[3] = yytext[3]; @@ -840,11 +840,11 @@ extern void CopyBoard P((Board to, Board from)); if (WhiteOnMove(yyboardindex)) { currentMoveString[0] = ToUpper(yytext[0]); - return (int) WhiteDrop; } else { currentMoveString[0] = ToLower(yytext[0]); - return (int) BlackDrop; } + return LegalityTest(boards[yyboardindex], PosFlags(yyboardindex), DROP_RANK, // [HGM] does drops now too + CharToPiece(currentMoveString[0]), currentMoveString[3] - ONE, currentMoveString[2] - AAA, NULLCHAR); } [Rr]esign(s|ed)? {