]> git.sesse.net Git - stockfish/commitdiff
Fix perft 1
authorMarco Costalba <mcostalba@gmail.com>
Sat, 9 Aug 2014 09:33:02 +0000 (11:33 +0200)
committerlucasart <lucas.braesch@gmail.com>
Sat, 9 Aug 2014 23:36:22 +0000 (07:36 +0800)
Compute correct number of moves for this corner case.

A smal bug crept in after recent perft rework.

No functional change.

src/search.cpp

index 144776aac160bcc411bdc86a50592e98aa537abd..c7eb5f9a70f19d200f3cc291ea9fdd0fa852577b 100644 (file)
@@ -163,7 +163,7 @@ uint64_t Search::perft(Position& pos, Depth depth) {
   for (MoveList<LEGAL> it(pos); *it; ++it)
   {
       if (Root && depth <= ONE_PLY)
-          cnt = 1;
+          cnt = 1, nodes++;
       else
       {
           pos.do_move(*it, st, ci, pos.gives_check(*it, ci));