Fix assertion for en passant
authorFabian Fichter <ianfab@users.noreply.github.com>
Sat, 1 Apr 2023 14:35:19 +0000 (16:35 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sat, 1 Apr 2023 14:35:19 +0000 (16:35 +0200)
src/movegen.cpp

index 60a1efd..6c852aa 100644 (file)
@@ -263,7 +263,8 @@ namespace {
 
             Bitboard b = pawns & pawn_attacks_bb(Them, epSquare);
 
-            assert(b);
+            // En passant square is already disabled for non-fairy variants if there is no attacker
+            assert(b || !pos.variant()->fastAttacks);
 
             while (b)
                 moveList = make_move_and_gating<EN_PASSANT>(pos, moveList, Us, pop_lsb(b), epSquare);