X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=0c9f1ee703ef3dd188710826d2c7e2d3713c9354;hp=acd5d1da4ef7793f7ba02668b5907c2a461ff75e;hb=e145c0d3e278fb601db49cc16076f10a30b60f19;hpb=f74f42b2982e25e180417948771843e8bb6bd4b7 diff --git a/src/search.cpp b/src/search.cpp index acd5d1da..0c9f1ee7 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1540,10 +1540,10 @@ namespace { // Use the cached evaluation score if possible assert(ei.futilityMargin == Value(0)); - staticValue = tte->value() + ply; + staticValue = tte->value(); } else - staticValue = evaluate(pos, ei, threadID) + ply; + staticValue = evaluate(pos, ei, threadID); if (ply == PLY_MAX - 1) return evaluate(pos, ei, threadID); @@ -2182,7 +2182,7 @@ namespace { // Case 4: The destination square for m2 is attacked by the moving piece in m1 p = pos.piece_on(t1); - if (bit_is_set(pos.piece_attacks(p, t1), t2)) + if (bit_is_set(pos.attacks_from(p, t1), t2)) return true; // Case 5: Discovered check, checking piece is the piece moved in m1