mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Fix a shift overflow warning
Visual Studio 11 is worried that shift result could overflow an integer, this is impossible becuase max value of the shift is 4, but compiler cannot know it. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -1520,7 +1520,7 @@ void Position::init() {
|
||||
Bitboard b = cr;
|
||||
while (b)
|
||||
{
|
||||
Key k = zobCastle[1 << pop_1st_bit(&b)];
|
||||
Key k = zobCastle[1ULL << pop_1st_bit(&b)];
|
||||
zobCastle[cr] ^= k ? k : rk.rand<Key>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user