diff --git a/src/bitboard.h b/src/bitboard.h index b99cc259..35904377 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -280,7 +280,7 @@ FORCE_INLINE Square msb(Bitboard b) { FORCE_INLINE Square pop_lsb(Bitboard* b) { const Square s = lsb(*b); - *b &= ~(1ULL << s); + *b &= *b - 1; return s; }