]> git.sesse.net Git - stockfish/blobdiff - src/material.cpp
Do not reset ss->eval in the beginning of the node
[stockfish] / src / material.cpp
index 0fce07b1d03ea28313253c8866a5d120ecdf46d9..f2e501c1d862091545806cbc07b148e82e2754b5 100644 (file)
@@ -182,7 +182,7 @@ Phase MaterialInfoTable::game_phase(const Position& pos) {
 MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) {
 
   Key key = pos.get_material_key();
-  int index = key & (size - 1);
+  unsigned index = unsigned(key & (size - 1));
   MaterialInfo* mi = entries + index;
 
   // If mi->key matches the position's material hash key, it means that we
@@ -403,7 +403,7 @@ Key EndgameFunctions::buildKey(const string& keyCode) {
         s << char(upcase? toupper(keyCode[i]) : tolower(keyCode[i]));
     }
     s << 8 - keyCode.length() << "/8/8/8/8/8/8/8 w -";
-    return Position(s.str()).get_material_key();
+    return Position(s.str(), 0).get_material_key();
 }
 
 const string EndgameFunctions::swapColors(const string& keyCode) {