diff --git a/src/position.h b/src/position.h index 85c4c29dc..a0da7de0c 100644 --- a/src/position.h +++ b/src/position.h @@ -671,11 +671,11 @@ inline Bitboard Position::drop_region(Color c, PieceType pt) const { { if (c == WHITE) { - b &= var->whitePieceDropRegion.boardOfPiece(toupper(piece_to_char()[(c << PIECE_TYPE_BITS) + pt])); + b &= var->whitePieceDropRegion.boardOfPiece(toupper(piece_to_char()[(c << PIECE_TYPE_BITS) | pt])); } else if (c == BLACK) { - b &= var->blackPieceDropRegion.boardOfPiece(toupper(piece_to_char()[(c << PIECE_TYPE_BITS) + pt])); + b &= var->blackPieceDropRegion.boardOfPiece(toupper(piece_to_char()[(c << PIECE_TYPE_BITS) | pt])); } }