Fix a shift overflow warning
authorMarco Costalba <mcostalba@gmail.com>
Mon, 27 Feb 2012 19:30:34 +0000 (20:30 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 27 Feb 2012 19:32:41 +0000 (20:32 +0100)
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>
src/position.cpp

index 537674c9119c123370c44456cfb7b9ea94301451..0ffcc79447bb67db6cdde1f322a685782fa43d03 100644 (file)
@@ -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>();
       }
   }