X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=4c8145c490f508d68375298a0180243bd1646bd1;hp=0449222e016406f5e2e63804e8f695e5771cf28c;hb=6d89d0b64a99003576d3e0ed616b43333c9eca01;hpb=1781439fc2bfb12f8a4e89b2a75fdeac6cd58672 diff --git a/src/position.cpp b/src/position.cpp index 0449222e..4c8145c4 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1100,10 +1100,10 @@ bool Position::is_draw(int ply) const { stp = stp->previous->previous; // At root position ply is 1, so return a draw score if a position - // repeats once earlier but after or at the root, or repeats twice - // strictly before the root. + // repeats once earlier but strictly after the root, or repeats twice + // before or at the root. if ( stp->key == st->key - && ++cnt + (ply - i > 0) == 2) + && ++cnt + (ply - 1 > i) == 2) return true; }