X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=8b44587f6962ccfc0e05ca1a7b91e4a15d84a85e;hp=40037bba47ed82e93e106a7828688ced284b4556;hb=cccf3c815c2f2be884fac4248a2be91b6823df8a;hpb=76ed0ab5015f41715453a7efcedd57a7a5c962da diff --git a/src/pawns.cpp b/src/pawns.cpp index 40037bba..8b44587f 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -116,7 +116,7 @@ namespace { Bitboard ourPawns = pos.pieces(Us , PAWN); Bitboard theirPawns = pos.pieces(Them, PAWN); - e->passedPawns[Us] = 0; + e->passedPawns[Us] = e->pawnAttacksSpan[Us] = 0; e->kingSquares[Us] = SQ_NONE; e->semiopenFiles[Us] = 0xFF; e->pawnAttacks[Us] = shift_bb(ourPawns) | shift_bb(ourPawns); @@ -133,6 +133,8 @@ namespace { // This file cannot be semi-open e->semiopenFiles[Us] &= ~(1 << f); + e->pawnAttacksSpan[Us] |= pawn_attack_span(Us, s); + // Flag the pawn neighbours = ourPawns & adjacent_files_bb(f); doubled = ourPawns & forward_bb(Us, s);