projects
/
stockfish
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77a1d68
)
Fix a crash issue when traversing PVs.
author
Steinar H. Gunderson
<sgunderson@bigfoot.com>
Tue, 15 Nov 2016 21:03:15 +0000
(22:03 +0100)
committer
Steinar H. Gunderson
<sgunderson@bigfoot.com>
Wed, 26 Dec 2018 09:43:37 +0000
(10:43 +0100)
src/main.cpp
patch
|
blob
|
history
diff --git
a/src/main.cpp
b/src/main.cpp
index de220eec97a8ae16bf98a85c0c59df3f0b400865..76aca51d2e8f5f13d8178029ab1f4427bbdab0d3 100644
(file)
--- a/
src/main.cpp
+++ b/
src/main.cpp
@@
-119,7
+119,9
@@
void HashProbeImpl::ProbeMove(Position* pos, std::deque<StateInfo>* setup_states
// Follow the PV until we hit an illegal move.
std::stack<Move> pv;
std::set<Key> seen;
- while (found && is_ok(entry->move())) {
+ while (found && is_ok(entry->move()) &&
+ pos->pseudo_legal(entry->move()) &&
+ pos->legal(entry->move())) {
FillMove(entry->move(), response->add_pv());
if (seen.count(pos->key())) break;
pv.push(entry->move());