X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fnotation.cpp;h=15661eec725ab7c7b788f51cc825cb9e201a57f1;hp=dea72441620b3a0ddb5bdd6a2b3fd4adcf2a6af0;hb=55df3fa2d7631ed67e46f9433aa7f3a71c18e5e7;hpb=00a853950f56f315d9f26a67e54a187762992a9d diff --git a/src/notation.cpp b/src/notation.cpp index dea72441..15661eec 100644 --- a/src/notation.cpp +++ b/src/notation.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "movegen.h" #include "notation.h" @@ -226,7 +226,7 @@ string pretty_pv(Position& pos, int depth, Value value, int64_t msecs, Move pv[] const int64_t K = 1000; const int64_t M = 1000000; - StateInfo state[MAX_PLY_PLUS_2], *st = state; + std::stack st; Move* m = pv; string san, padding; size_t length; @@ -261,7 +261,8 @@ string pretty_pv(Position& pos, int depth, Value value, int64_t msecs, Move pv[] s << san << ' '; length += san.length() + 1; - pos.do_move(*m++, *st++); + st.push(StateInfo()); + pos.do_move(*m++, st.top()); } while (m != pv)