Skip to content

Commit 8b8885a

Browse files
mcostalbalucasart
authored andcommitted
Fix perft 1
Compute correct number of moves for this corner case. A smal bug crept in after recent perft rework. No functional change.
1 parent a903ed0 commit 8b8885a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/search.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ uint64_t Search::perft(Position& pos, Depth depth) {
163163
for (MoveList<LEGAL> it(pos); *it; ++it)
164164
{
165165
if (Root && depth <= ONE_PLY)
166-
cnt = 1;
166+
cnt = 1, nodes++;
167167
else
168168
{
169169
pos.do_move(*it, st, ci, pos.gives_check(*it, ci));

0 commit comments

Comments
 (0)