- // to be searched deeper than the first move.
- Depth d = std::clamp(newDepth - r, 1, newDepth + (r < -1 && moveCount <= 5));
+ // to be searched deeper than the first move, unless ttMove was extended by 2.
+ Depth d = std::clamp(newDepth - r, 1, newDepth + (r < -1 && moveCount <= 5 && !doubleExtension));