1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-12 03:59:15 +00: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:
Marco Costalba 2012-02-27 20:30:34 +01:00
parent 34178205fc
commit c2a68708ef

View file

@ -1520,7 +1520,7 @@ void Position::init() {
Bitboard b = cr; Bitboard b = cr;
while (b) 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>(); zobCastle[cr] ^= k ? k : rk.rand<Key>();
} }
} }