mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 03:26:24 +08:00
Initialize Tablebases::MaxCardinality to 0 to prevent uninitialized variable read in rank_root_moves
This commit is contained in:
@@ -112,11 +112,6 @@ void clear();
|
||||
|
||||
} // namespace Search
|
||||
|
||||
namespace Tablebases {
|
||||
|
||||
extern int MaxCardinality;
|
||||
|
||||
}
|
||||
namespace Learner {
|
||||
|
||||
// A pair of reader and evaluation value. Returned by Learner::search(),Learner::qsearch().
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
using namespace Tablebases;
|
||||
|
||||
int Tablebases::MaxCardinality;
|
||||
int Tablebases::MaxCardinality = 0;
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
namespace Tablebases {
|
||||
|
||||
extern int MaxCardinality;
|
||||
|
||||
enum WDLScore {
|
||||
WDLLoss = -2, // Loss
|
||||
WDLBlessedLoss = -1, // Loss, but draw under 50-move rule
|
||||
|
||||
Reference in New Issue
Block a user