]> git.sesse.net Git - stockfish/blobdiff - src/pawns.cpp
Fix: In qsearch do not use TT value when in a PV node
[stockfish] / src / pawns.cpp
index 6fd3e215b6fbee634489d76690fd101e5de5a89f..8dfb75a9d40692aaffb769895548a58c1b272556 100644 (file)
@@ -26,6 +26,7 @@
 #include <cstring>
 
 #include "pawns.h"
+#include "position.h"
 
 
 ////
@@ -216,7 +217,7 @@ PawnInfo *PawnInfoTable::get_pawn_info(const Position &pos) {
         File f = square_file(s);
         Rank r = square_rank(s);
 
-        assert(pos.piece_on(s) == pawn_of_color(us));
+        assert(pos.piece_on(s) == piece_of_color_and_type(us, PAWN));
 
         // The file containing the pawn is not half open
         pi->halfOpenFiles[us] &= ~(1 << f);