Fix a piece_of_color_and_type() / pieceS_of_color_and_type() typo
authorMarco Costalba <mcostalba@gmail.com>
Wed, 23 Sep 2009 12:55:44 +0000 (14:55 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 23 Sep 2009 16:01:30 +0000 (17:01 +0100)
Bug introduced in 17c51192

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/position.cpp

index 96b455f1249801cf9b6435ec72b0ea2b2f30b5ba..1725acbb4bc76ef68cb91249b76e0d9fa9beec98 100644 (file)
@@ -2014,7 +2014,7 @@ bool Position::is_ok(int* failedStep) const {
           for(PieceType pt = PAWN; pt <= KING; pt++)
               for(int i = 0; i < pieceCount[c][pt]; i++)
               {
-                  if (piece_on(piece_list(c, pt, i)) != (pieces(pt, c)))
+                  if (piece_on(piece_list(c, pt, i)) != piece_of_color_and_type(c, pt))
                       return false;
 
                   if (index[piece_list(c, pt, i)] != i)