fix max depth crash

bench: 1315668
This commit is contained in:
rektdie committed 2026-03-27 03:34:38 +01:00
1 parent aafc6af697
commit f9e0f5db1a
1 file changed
+2 -2
+2 -2
View File
@@ -262,7 +262,7 @@ template <bool isPV, searchMode mode>
static SearchResults Quiescence(Board& board, int alpha, int beta, int ply, SearchContext* ctx) { static SearchResults Quiescence(Board& board, int alpha, int beta, int ply, SearchContext* ctx) {
if (ShouldStop<mode>(ctx)) return 0; if (ShouldStop<mode>(ctx)) return 0;
if (ply >= MAX_DEPTH) if (ply + 1 >= MAX_DEPTH)
return NNUE::net.Evaluate(board); return NNUE::net.Evaluate(board);
if (ply > ctx->seldepth) if (ply > ctx->seldepth)
@@ -378,7 +378,7 @@ template <bool isPV, searchMode mode>
SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchContext* ctx, bool cutnode) { SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchContext* ctx, bool cutnode) {
if (ShouldStop<mode>(ctx)) return 0; if (ShouldStop<mode>(ctx)) return 0;
if (ply >= MAX_DEPTH) if (ply + 1 >= MAX_DEPTH)
return NNUE::net.Evaluate(board); return NNUE::net.Evaluate(board);
if (ply > ctx->seldepth) if (ply > ctx->seldepth)