]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Perft should return an int64_t not an int
[stockfish] / src / search.cpp
index d75036b33413eee1705200ed6905c7df1aa60570..ba0a47f52ed3a9c8668e101959c5c2fb82d20050 100644 (file)
@@ -364,12 +364,12 @@ void init_search() {
 /// perft() is our utility to verify move generation is bug free. All the legal
 /// moves up to given depth are generated and counted and the sum returned.
 
-int perft(Position& pos, Depth depth)
+int64_t perft(Position& pos, Depth depth)
 {
     MoveStack mlist[MOVES_MAX];
     StateInfo st;
     Move m;
-    int sum = 0;
+    int64_t sum = 0;
 
     // Generate all legal moves
     MoveStack* last = generate_moves(pos, mlist);