X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=4aa0efb60bfb4998de0d33d7148f4ab5bfca5110;hp=baf49705db7a6e00034a9ed9f561f267fda9b9cc;hb=5cf9e0b254262094efb2bdb9f81d213c515b102e;hpb=1d1b7df7c6b3496d1a3fe926cadf25d91e1558f6 diff --git a/src/position.h b/src/position.h index baf49705..4aa0efb6 100644 --- a/src/position.h +++ b/src/position.h @@ -292,7 +292,7 @@ inline Square Position::castling_rook_square(CastlingRight cr) const { template inline Bitboard Position::attacks_from(Square s) const { - return Pt == BISHOP || Pt == ROOK ? attacks_bb(s, pieces()) + return Pt == BISHOP || Pt == ROOK ? attacks_bb(s, byTypeBB[ALL_PIECES]) : Pt == QUEEN ? attacks_from(s) | attacks_from(s) : StepAttacksBB[Pt][s]; }