Fix doubled pawns asymmetry
[stockfish] / src / pawns.cpp
index 1099c5a48a67a9e5f15f1526ce720c299800c06a..fe989e9b8f24a502f7febb083f4b6733beae5d8b 100644 (file)
@@ -165,7 +165,7 @@ namespace {
             value -= UnsupportedPawnPenalty;
 
         if (doubled)
-            value -= Doubled[f] / distance<Rank>(s, Square(lsb(doubled)));
+            value -= Doubled[f] / distance<Rank>(s, frontmost_sq(Us, doubled));
 
         if (backward)
             value -= Backward[opposed][f];