Skip to content

Commit 66d3364

Browse files
authored
fix overflow
1 parent be920c1 commit 66d3364

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

search.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ namespace engine
3333
}
3434
Value doSearch(Board &board, int depth, Value alpha, Value beta, Session &session, int ply = 0)
3535
{
36+
if (ply >= MAX_PLY-1) return eval::eval(board);
3637
Value alphaOrig=alpha;
3738
std::fill(std::begin(session.pv[ply + 1]), std::end(session.pv[ply + 1]),
3839
Move::none());

0 commit comments

Comments
 (0)