mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 08:13:08 +00:00
Fix another crash triggered by previous patch
It is ok to redirect st pointer to startState, but the latter should be updated with the content pointed by the st of the original position. The bug is hidden when startState and *st are the same as is the case of searching from start position, but as soon as moves are made (as is the case when splitting) the bug leads to a crash. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
377c406c74
commit
7d97ebfe7f
1 changed files with 1 additions and 0 deletions
|
@ -100,6 +100,7 @@ CheckInfo::CheckInfo(const Position& pos) {
|
|||
void Position::copy(const Position& pos, int th) {
|
||||
|
||||
memcpy(this, &pos, sizeof(Position));
|
||||
startState = *st;
|
||||
st = &startState;
|
||||
threadID = th;
|
||||
nodes = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue