X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitbase.cpp;h=0f274c8aeb82a7d1d7ab0ddf3cfc6833d6f7b570;hp=6094f50fbe9da0b9bca1bc3e47927bc35f43f977;hb=95b24083fb0476b6fa332db923c175e654cd0f0b;hpb=fcf2a34080404b90cac46184d76e8f2cdda16bd2 diff --git a/src/bitbase.cpp b/src/bitbase.cpp index 6094f50f..0f274c8a 100644 --- a/src/bitbase.cpp +++ b/src/bitbase.cpp @@ -107,11 +107,11 @@ namespace { KPKPosition::KPKPosition(unsigned idx) { - wksq = Square((idx >> 0) & 0x3F); - bksq = Square((idx >> 6) & 0x3F); - us = Color ((idx >> 12) & 0x01); - psq = make_square(File((idx >> 13) & 0x03), Rank(RANK_7 - (idx >> 15))); - result = UNKNOWN; + wksq = Square((idx >> 0) & 0x3F); + bksq = Square((idx >> 6) & 0x3F); + us = Color ((idx >> 12) & 0x01); + psq = make_square(File((idx >> 13) & 0x3), RANK_7 - Rank((idx >> 15) & 0x7)); + result = UNKNOWN; // Check if two pieces are on the same square or if a king can be captured if ( square_distance(wksq, bksq) <= 1