Skip to content

Commit d5d00ef

Browse files
depth can be negative (qsearch)
1 parent 8a7c6a4 commit d5d00ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/TranspositionTable.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void TranspositionTable::setEntry(const ChessBoard &board, const Move bestMove,
4040

4141
const NodeType savedType = entries[index].nodeType;
4242

43-
const Entry entry = {board.hashCode, bestMove, score, static_cast<uint8_t>(depth), nodeType};
43+
const Entry entry = {board.hashCode, bestMove, score, static_cast<int8_t>(depth), nodeType};
4444

4545
//REPLACEMENT SCHEME
4646
// 1. Prefer EXACT nodes to bounds

src/TranspositionTable.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class TranspositionTable {
2323
uint64_t key: 64;
2424
Move bestMove;
2525
int32_t score: 32;
26-
uint8_t depth: 8;
26+
int8_t depth: 8;
2727
NodeType nodeType: 3;
2828
};
2929

0 commit comments

Comments
 (0)