summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/search.c')
-rwxr-xr-xsrc/search.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/search.c b/src/search.c
index 3b8000c..28f6f3d 100755
--- a/src/search.c
+++ b/src/search.c
@@ -163,6 +163,7 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx,
ASSERT(IS_VALID_FLAG(pf->fVerifyNullmove));
memcpy(&pi->sPosition, pos, sizeof(POSITION));
#endif
+ mvBest.uMove = 0;
// Jump directly to Qsearch if remaining depth is low enough.
// This is the only place Qsearch is entered.
@@ -334,7 +335,6 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx,
// Also clear the avoid null bit in the search flags -- we were
// either told to avoid it or not but there is no need to avoid it
// for the rest of the line...
- mvBest.uMove = 0;
pf->fAvoidNullmove = FALSE;
do
{
@@ -1071,6 +1071,7 @@ QSearchInDangerNoStandPat(IN SEARCHER_THREAD_CONTEXT *ctx,
-iAlpha);
pf->uQsearchDepth--;
UnmakeMove(ctx, mv);
+ if (WE_SHOULD_STOP_SEARCHING) goto end;
if (iScore > iBestScore)
{
@@ -1092,7 +1093,6 @@ QSearchInDangerNoStandPat(IN SEARCHER_THREAD_CONTEXT *ctx,
}
}
}
- if (WE_SHOULD_STOP_SEARCHING) goto end;
}
}
ASSERT(SanityCheckMoves(ctx, x, VERIFY_BEFORE));