X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=3529627fd4d946949c9794b487f6c7eea44b25c8;hp=2fe6a5c1f68322cf8a28790c64bda74831ca965e;hb=d99a95df29574634146ec04a20726829681b2e23;hpb=0da1d6a84612c8443b3e3c9b3f74890635ce23e2;ds=sidebyside diff --git a/src/search.cpp b/src/search.cpp index 2fe6a5c1..3529627f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -2195,15 +2195,18 @@ namespace { if (mateThreat) result += MateThreatExtension[pvNode]; - if (pos.move_is_pawn_push_to_7th(m)) + if (pos.type_of_piece_on(move_from(m)) == PAWN) { - result += PawnPushTo7thExtension[pvNode]; - *dangerous = true; - } - if (pos.move_is_passed_pawn_push(m)) - { - result += PassedPawnExtension[pvNode]; - *dangerous = true; + if (pos.move_is_pawn_push_to_7th(m)) + { + result += PawnPushTo7thExtension[pvNode]; + *dangerous = true; + } + if (pos.move_is_passed_pawn_push(m)) + { + result += PassedPawnExtension[pvNode]; + *dangerous = true; + } } if ( pos.move_is_capture(m)