]> git.sesse.net Git - stockfish/blobdiff - src/pawns.cpp
Fix DIVIDE BY ZERO exception in init_search()
[stockfish] / src / pawns.cpp
index 8835d327e068b1e12215cfe754d3e17bcd641970..1cdeb461d51e2a2e74a56860f3d3e3c65998d70d 100644 (file)
@@ -148,7 +148,7 @@ PawnInfo* PawnInfoTable::get_pawn_info(const Position& pos) const {
   assert(pos.is_ok());
 
   Key key = pos.get_pawn_key();
-  int index = int(key & (size - 1));
+  unsigned index = unsigned(key & (size - 1));
   PawnInfo* pi = entries + index;
 
   // If pi->key matches the position's pawn hash key, it means that we