diff --git a/src/search.cpp b/src/search.cpp index b460b110..c8218bf6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -900,7 +900,7 @@ moves_loop: // When in check and at SpNode search starts from here { rm.score = value; rm.pv.resize(1); - for (int i = 0; (ss+1)->pv && i < MAX_PLY && (ss+1)->pv->pv[i] != MOVE_NONE; ++i) + for (int i = 0; (ss+1)->pv && (ss+1)->pv->pv[i] != MOVE_NONE; ++i) rm.pv.push_back((ss+1)->pv->pv[i]); // We record how often the best move has been changed in each diff --git a/src/search.h b/src/search.h index 5975b70f..0216e08e 100644 --- a/src/search.h +++ b/src/search.h @@ -37,7 +37,7 @@ struct PVEntry { void update(Move move, PVEntry* child) { int i = 1; - for (pv[0] = move; child && i < MAX_PLY && child->pv[i - 1] != MOVE_NONE; ++i) + for (pv[0] = move; child && child->pv[i - 1] != MOVE_NONE; ++i) pv[i] = child->pv[i - 1]; pv[i] = MOVE_NONE; }