Fix bug in evaluate_passed_pawns()
authorMarco Costalba <mcostalba@gmail.com>
Sat, 30 Apr 2011 12:02:56 +0000 (13:02 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 3 May 2011 11:10:53 +0000 (12:10 +0100)
commitb1929960f9b73cb8fcc86fdbdf7a8d2d1de4fc53
treee6951234317aabd159f4ccd2d9f21fae57d8af40
parent8447248705bc6cf91fc8cdbb519c31925862ea74
Fix bug in evaluate_passed_pawns()

If blockSq is already on rank 8, blockSq + pawn_push(Us) is on rank 9,
outside of board. It does not make sense to measure king distance to
a field outside the board.

Bug spotted by Fruity:
http://open-chess.org/viewtopic.php?f=5&t=1156&start=10

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