if(depth <= 0) { // QS
if(ff->checker != CK_NONE && ff->tpGain > 0) anaEval = 50-INF; // forbid stand pat if horizon check tossed material
if(anaEval > alpha) {
- if(anaEval >= beta) { ff->depth = 1; moveSP = oldSP; return anaEval + (anaEval < curEval); } // stand-pat cutoff
+ if(anaEval >= beta) { ff->depth = 1; moveSP = oldSP; anaSP = oldna; return anaEval + (anaEval < curEval); } // stand-pat cutoff
alpha = startScore = anaEval; maxDepth = 0; // we will not fail low, so no extra iterations
}
if(maxDepth <= 0) {
// move generation
if(!earlyGen) { // generate moves if we had not done so yet
if(MoveGen(stm, &m, f.rights)) { // impossible (except for hash collision giving wrong in-check status)
- if(DEBUG) Dump("King capture"); ff->depth = MAXPLY; moveSP = oldSP; return INF;
+ if(DEBUG) Dump("King capture"); ff->depth = MAXPLY; moveSP = oldSP; anaSP = oldAna; return INF;
}
if(f.checkDist && maxDepth <= 1) ipMask = SafeIP(&f);
}