X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=9a826d3724dc43bc7e6e8bff935f064ac18d5104;hb=a05793517f9c1e4483df7928473a1ff3a2a8d640;hp=7cb53fbf32064a53ff69cd97e774c56233dcd32e;hpb=ee0f5cd3034d4da3349f1fd8b43aaafce908b22e;p=stockfish 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; }