Fix incorrect enpassant flag for moves read from uci format in the binpack lib

This commit is contained in:
Tomasz Sobczyk
2020-12-08 23:44:26 +01:00
committed by nodchip
parent b49fd3ab30
commit d99ba07b81

View File

@@ -6238,7 +6238,7 @@ namespace chess
return Move::castle(castleType, pos.sideToMove());
}
else if (pos.epSquare() == to)
else if (pos.pieceAt(from).type() == PieceType::Pawn && pos.epSquare() == to)
{
return Move::enPassant(from, to);
}