From b8af3f021ba9e9e95f510d3e6f6e19323a12ea8f Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Sun, 7 Oct 2018 15:59:18 +0200 Subject: [PATCH] Avoid overflow in bit-shift operation Fixes error in Travis build. --- src/search.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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] -- 1.7.0.4