32-bit truncation would make this function bogus when clusterCount >= 2^33 (ie. Hash >= 256 GB).
No function change.
inline TTEntry* TranspositionTable::first_entry(const Key key) const {
inline TTEntry* TranspositionTable::first_entry(const Key key) const {
- return &table[(uint32_t)key & (clusterCount - 1)].entry[0];
+ return &table[(size_t)key & (clusterCount - 1)].entry[0];
}
#endif // #ifndef TT_H_INCLUDED
}
#endif // #ifndef TT_H_INCLUDED