X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=book.c;fp=book.c;h=cfc25c8d95a5a0a3f5745eebbb54b05aea6a03ba;hb=6bead4fda35db0cb9ec61309ee7cd9c99bb53475;hp=6a257d83c859a01dd64ffb8eab7b774ef83ccf70;hpb=1a20cca869f5be5ecc22c972535d18259addc791;p=xboard.git diff --git a/book.c b/book.c index 6a257d8..cfc25c8 100644 --- a/book.c +++ b/book.c @@ -315,7 +315,7 @@ hash (int moveNr) if(p != EmptySquare){ int j = (int)p, promoted = 0; j -= (j >= (int)BlackPawn) ? (int)BlackPawn :(int)WhitePawn; - if(j >= WhiteTokin && j != WhiteKing) promoted++, j -= WhiteTokin; + if(j >= WhitePBishop && j != WhiteKing) promoted++, j -= WhiteTokin; if(j > (int)WhiteQueen) j++; // make space for King if(j > (int) WhiteKing) j = (int)WhiteQueen + 1; p_enc = 2*j + ((int)p < (int)BlackPawn);