X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=9a826d3724dc43bc7e6e8bff935f064ac18d5104;hp=7cb53fbf32064a53ff69cd97e774c56233dcd32e;hb=2ac35027d5900a641559fae7b22a994f8b4c2d72;hpb=d2752fdc15f94b2eeb0a91533cc79c100738c2af diff --git a/src/search.cpp b/src/search.cpp index 7cb53fbf..9a826d37 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1239,8 +1239,8 @@ moves_loop: // When in check, search starts from here && ttHit && tte->depth() >= ttDepth && ttValue != VALUE_NONE // Only in case of TT access race - && (ttValue >= beta ? (tte->bound() & BOUND_LOWER) - : (tte->bound() & BOUND_UPPER))) + && (ttValue >= beta ? (tte->bound() & BOUND_LOWER) + : (tte->bound() & BOUND_UPPER))) return ttValue; // Evaluate the position statically @@ -1258,7 +1258,7 @@ moves_loop: // When in check, search starts from here ss->staticEval = bestValue = evaluate(pos); // Can ttValue be used as a better position evaluation? - if ( ttValue != VALUE_NONE + if ( ttValue != VALUE_NONE && (tte->bound() & (ttValue > bestValue ? BOUND_LOWER : BOUND_UPPER))) bestValue = ttValue; }