diff --git a/src/search.cpp b/src/search.cpp index 376705d1..ccea71ca 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -255,7 +255,7 @@ namespace { multiPV = std::max(multiPV, skill.candidates_size()); // Iterative deepening loop until requested to stop or target depth reached - while (++depth < MAX_PLY && !Signals.stop && (!Limits.depth || depth <= Limits.depth)) + while (++depth < DEPTH_MAX && !Signals.stop && (!Limits.depth || depth <= Limits.depth)) { // Age out PV variability metric BestMoveChanges *= 0.5; diff --git a/src/types.h b/src/types.h index 94be8338..d725c136 100644 --- a/src/types.h +++ b/src/types.h @@ -212,7 +212,8 @@ enum Depth { DEPTH_QS_NO_CHECKS = -1, DEPTH_QS_RECAPTURES = -5, - DEPTH_NONE = -6 + DEPTH_NONE = -6, + DEPTH_MAX = MAX_PLY }; enum Square {