Skip to content

Commit

Permalink
Bench: 21963671
Browse files Browse the repository at this point in the history
  • Loading branch information
TerjeKir committed Nov 2, 2023
1 parent 76f413e commit 903fad2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ static int Quiescence(Thread *thread, Stack *ss, int alpha, const int beta) {

// Probe transposition table
bool ttHit;
Key key = pos->key;
TTEntry *tte = ProbeTT(key, &ttHit);
TTEntry *tte = ProbeTT(pos->key, &ttHit);

Move ttMove = ttHit ? tte->move : NOMOVE;
int ttScore = ttHit ? ScoreFromTT(tte->score, ss->ply) : NOSCORE;
Expand Down Expand Up @@ -128,7 +127,8 @@ static int Quiescence(Thread *thread, Stack *ss, int alpha, const int beta) {

moveloop:

if (!inCheck) InitNoisyMP(&mp, thread, ss, ttMove); else InitNormalMP(&mp, thread, ss, 0, ttMove, NOMOVE, NOMOVE);
if (!inCheck) InitNoisyMP(&mp, thread, ss, ttMove);
else InitNormalMP(&mp, thread, ss, 0, ttMove, NOMOVE, NOMOVE);

// Move loop
Move bestMove = NOMOVE;
Expand Down Expand Up @@ -184,7 +184,7 @@ static int Quiescence(Thread *thread, Stack *ss, int alpha, const int beta) {
if (inCheck && bestScore == -INFINITE)
return -MATE + ss->ply;

StoreTTEntry(tte, key, bestMove, ScoreToTT(bestScore, ss->ply), eval, 0,
StoreTTEntry(tte, pos->key, bestMove, ScoreToTT(bestScore, ss->ply), eval, 0,
bestScore >= beta ? BOUND_LOWER : BOUND_UPPER);

return bestScore;
Expand Down

0 comments on commit 903fad2

Please sign in to comment.