X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=982352c51b74bbde4f91d0f4f34f8a84e78c33e8;hp=6b05c24b2a434d3ef1f41b454af877883dc0b765;hb=86c20416c85ac93ab982dda404fc268a92636fa6;hpb=c9e396b5424802b80e80394979ca84688b523244 diff --git a/src/position.cpp b/src/position.cpp index 6b05c24b..982352c5 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -297,7 +297,7 @@ void Position::set(const string& fenStr, bool isChess960, Thread* th) { // Convert from fullmove starting from 1 to ply starting from 0, // handle also common incorrect FEN with fullmove = 0. - gamePly = std::max(2 * (gamePly - 1), 0) + int(sideToMove == BLACK); + gamePly = std::max(2 * (gamePly - 1), 0) + (sideToMove == BLACK); chess960 = isChess960; thisThread = th; @@ -424,7 +424,7 @@ const string Position::fen() const { ss << '-'; ss << (ep_square() == SQ_NONE ? " - " : " " + to_string(ep_square()) + " ") - << st->rule50 << " " << 1 + (gamePly - int(sideToMove == BLACK)) / 2; + << st->rule50 << " " << 1 + (gamePly - (sideToMove == BLACK)) / 2; return ss.str(); }