Fix doubled pawns asymmetry
[stockfish] / src / pawns.cpp
index 1099c5a..fe989e9 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];