mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Fix: Honour UCI "quit" command while still in the book
We were not quitting the engine after a "quit" command while still in the book and pondering. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
7315001f37
commit
6df86fc9da
1 changed files with 2 additions and 2 deletions
|
@ -424,7 +424,7 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[
|
||||||
wait_for_stop_or_ponderhit();
|
wait_for_stop_or_ponderhit();
|
||||||
|
|
||||||
cout << "bestmove " << bookMove << endl;
|
cout << "bestmove " << bookMove << endl;
|
||||||
return true;
|
return !QuitRequest;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2072,7 +2072,7 @@ split_point_start: // At split points actual search starts from here
|
||||||
// the UCI protocol: When pondering, the engine is not allowed to give a
|
// the UCI protocol: When pondering, the engine is not allowed to give a
|
||||||
// "bestmove" before the GUI sends it a "stop" or "ponderhit" command.
|
// "bestmove" before the GUI sends it a "stop" or "ponderhit" command.
|
||||||
// We simply wait here until one of these commands is sent, and return,
|
// We simply wait here until one of these commands is sent, and return,
|
||||||
// after which the bestmove and pondermove will be printed (in id_loop()).
|
// after which the bestmove and pondermove will be printed.
|
||||||
|
|
||||||
void wait_for_stop_or_ponderhit() {
|
void wait_for_stop_or_ponderhit() {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue