X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=parser.l;h=392b5b256d59619c09ff14bd3be187967442eca0;hb=50834a5d1deb1fa3f3edd73c61be0e55b89a637d;hp=061d6ca86f5911e8ccae3f7ffc7df89e28672345;hpb=f3a68fb378aa91c6e4b3f54fb875074888a07180;p=xboard.git diff --git a/parser.l b/parser.l index 061d6ca..392b5b2 100644 --- a/parser.l +++ b/parser.l @@ -12,7 +12,7 @@ * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, - * 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + * 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -845,6 +845,8 @@ extern void CopyBoard P((Board to, Board from)); } else { currentMoveString[0] = ToLower(yytext[0]); } + if(CharToPiece(currentMoveString[0]) == EmptySquare) return ImpossibleMove; // Unknown piece; + return LegalityTest(boards[yyboardindex], PosFlags(yyboardindex), DROP_RANK, // [HGM] does drops now too CharToPiece(currentMoveString[0]), currentMoveString[3] - ONE, currentMoveString[2] - AAA, NULLCHAR); }