X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitbase.cpp;h=1c4217b0e3b929ae22258fe20c9f71c1638260e8;hp=d206210414846e3c3392ac655318080397c8b4a4;hb=822695d4d3a9336dc54bfabd0996e75865358ae2;hpb=2acda1fde3e1542a0b1bfc5a0885559e6daf142a diff --git a/src/bitbase.cpp b/src/bitbase.cpp index d2062104..1c4217b0 100644 --- a/src/bitbase.cpp +++ b/src/bitbase.cpp @@ -111,7 +111,7 @@ namespace { ksq[WHITE] = Square((idx >> 0) & 0x3F); ksq[BLACK] = Square((idx >> 6) & 0x3F); us = Color ((idx >> 12) & 0x01); - psq = make_square(File((idx >> 13) & 0x3), RANK_7 - Rank((idx >> 15) & 0x7)); + psq = make_square(File((idx >> 13) & 0x3), Rank(RANK_7 - ((idx >> 15) & 0x7))); // Check if two pieces are on the same square or if a king can be captured if ( distance(ksq[WHITE], ksq[BLACK]) <= 1