diff --git a/src/search.cpp b/src/search.cpp index 7bc90b14..ac4d85b6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1556,7 +1556,7 @@ namespace { { // Store the score to avoid a future costly evaluation() call if (!isCheck && !tte && ei.futilityMargin == 0) - TT.store(pos.get_key(), bestValue - ply, VALUE_TYPE_EVAL, Depth(-127*OnePly), MOVE_NONE); + TT.store(pos.get_key(), value_to_tt(bestValue, ply), VALUE_TYPE_EVAL, Depth(-127*OnePly), MOVE_NONE); return bestValue; }