Fix a small bug in king safety
authorMarco Costalba <mcostalba@gmail.com>
Sun, 22 Mar 2009 12:11:24 +0000 (13:11 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 22 Mar 2009 12:11:24 +0000 (13:11 +0100)
Merged from iPhone Glaurung.

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

index 3e996da..c29fd5e 100644 (file)
@@ -782,7 +782,7 @@ namespace {
                         if (    bit_is_set(p.piece_attacks<QUEEN>(from), to)
                             && !bit_is_set(p.pinned_pieces(them), from)
                             && !(rook_attacks_bb(to, occ & ClearMaskBB[from]) & p.rooks_and_queens(us))
-                            && !(rook_attacks_bb(to, occ & ClearMaskBB[from]) & p.rooks_and_queens(us)))
+                            && !(bishop_attacks_bb(to, occ & ClearMaskBB[from]) & p.bishops_and_queens(us)))
 
                             ei.mateThreat[them] = make_move(from, to);
                     }