diff --git a/src/search.c b/src/search.c index 57aebc22..3582d688 100644 --- a/src/search.c +++ b/src/search.c @@ -579,9 +579,10 @@ static int AlphaBeta(Thread *thread, Stack *ss, int alpha, int beta, Depth depth if (rm->move == move) break; + rm->nodes += pos->nodes - startingNodes; + if (moveCount == 1 || score > alpha) { rm->score = score; - rm->nodes += pos->nodes - startingNodes; rm->pv.length = 1 + (ss+1)->pv.length; rm->pv.line[0] = move; memcpy(rm->pv.line+1, (ss+1)->pv.line, sizeof(Move) * (ss+1)->pv.length);