X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fevaluate.cpp;h=36a9b10a2f653c0361a351e4e51e25cd8cf8ead5;hb=5c81602d14539f8259a715477315e28b5de7cb54;hp=3e996da8d32ba6f247ad8b516a880af2d28f2dd0;hpb=feb5342b393895160867aa7c7fa4d6cb563718ca;p=stockfish diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 3e996da8..36a9b10a 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -1,7 +1,7 @@ /* Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) - Copyright (C) 2008 Marco Costalba + Copyright (C) 2008-2009 Marco Costalba Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -505,6 +505,8 @@ void quit_eval() { { delete PawnTable[i]; delete MaterialTable[i]; + PawnTable[i] = NULL; + MaterialTable[i] = NULL; } } @@ -782,7 +784,7 @@ namespace { if ( bit_is_set(p.piece_attacks(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); }