From: Fabian Fichter Date: Sun, 7 Oct 2018 13:59:18 +0000 (+0200) Subject: Avoid overflow in bit-shift operation X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=b8af3f021ba9e9e95f510d3e6f6e19323a12ea8f;p=fairystockfish.git Avoid overflow in bit-shift operation Fixes error in Travis build. --- diff --git a/src/search.cpp b/src/search.cpp index acc23ca..4b3f817 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -608,7 +608,7 @@ namespace { // search to overwrite a previous full search TT value, so we use a different // position key in case of an excluded move. excludedMove = ss->excludedMove; - posKey = pos.key() ^ Key(excludedMove << 16); // Isn't a very good hash + posKey = pos.key() ^ (Key(excludedMove) << 16); // Isn't a very good hash tte = TT.probe(posKey, ttHit); ttValue = ttHit ? value_from_tt(tte->value(), ss->ply) : VALUE_NONE; ttMove = rootNode ? thisThread->rootMoves[thisThread->pvIdx].pv[0]