diff --git a/src/search.cpp b/src/search.cpp index 38d56834..62788faa 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -948,8 +948,8 @@ moves_loop: // When in check, search starts from here && pos.see_ge(move)) extension = ONE_PLY; - else if ( pos.can_castle(us) // Extension for king moves that change castling rights - && type_of(movedPiece) == KING) + // Extension if castling + else if (type_of(move) == CASTLING) extension = ONE_PLY; // Calculate new depth for this move