X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=9c61cc88181e89411427d9158b92108d35285344;hp=44a1a404b580da478671a4b765ccffe839b23ffb;hb=6b49d509a1824a09c21d1d9f5e7e991ef2638db5;hpb=12f4bbc8f2b6122d9dc0949f3483e7dd3f26a829 diff --git a/src/position.cpp b/src/position.cpp index 44a1a404..9c61cc88 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1709,7 +1709,7 @@ bool Position::is_draw() const { bool Position::is_mate() const { MoveStack moves[MOVES_MAX]; - return is_check() && generate_moves(*this, moves) == moves; + return is_check() && generate(*this, moves) == moves; } @@ -1730,8 +1730,8 @@ bool Position::has_mate_threat() { do_null_move(st1); // Then generate pseudo-legal moves that could give check - last = generate(*this, mlist); - last = generate(*this, last); + last = generate(*this, mlist); + last = generate(*this, last); // Loop through the moves, and see if one of them gives mate Bitboard pinned = pinned_pieces(sideToMove);