X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=34a87771aea96a120e14f5858ffebd510f73d60f;hp=29d71ea9e0cce28078ccf4a715521d85b3f6bbac;hb=a9e93fa6a56d985e98f16a480a8b0d166fdea324;hpb=9e8bf82350002b826e40581100dbbcd1d65c796e diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 29d71ea9..34a87771 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -17,10 +17,10 @@ along with this program. If not, see . */ +#include #include #include #include -#include #include "bitcount.h" #include "evaluate.h" @@ -790,7 +790,8 @@ namespace { // Stealmate detection Color stm = pos.side_to_move(); if ( (ei.attackedBy[stm][ALL_PIECES] == ei.attackedBy[stm][KING]) - && (!(ei.attackedBy[stm][KING] & ~ei.attackedBy[~stm][ALL_PIECES]))) + && (!(ei.attackedBy[stm][KING] & ~ei.attackedBy[~stm][ALL_PIECES])) + && !MoveList(pos).size()) sf = SCALE_FACTOR_DRAW; // Interpolate between a middlegame and a (scaled by 'sf') endgame score