X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitbase.cpp;h=801815e70c2b21026d03094a3b1037192a376313;hp=36e93eead78eb6f602d5807e6a44513fa0840b27;hb=42de93ac15366d6d20c1b2fbf99b4780e8ac6617;hpb=c97104e8540b72ee2c6c9c13d3773d2c0f9ec32f diff --git a/src/bitbase.cpp b/src/bitbase.cpp index 36e93eea..801815e7 100644 --- a/src/bitbase.cpp +++ b/src/bitbase.cpp @@ -1,7 +1,7 @@ /* Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) - Copyright (C) 2008 Marco Costalba + Copyright (C) 2008-2010 Marco Costalba, Joona Kiiski, Tord Romstad Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -89,7 +89,8 @@ void generate_kpk_bitbase(uint8_t bitbase[]) { int i, j, b; for(i = 0; i < 24576; i++) { for(b = 0, j = 0; j < 8; b |= (compress_result(Bitbase[8*i+j]) << j), j++); - bitbase[i] = b; + assert(b == int(uint8_t(b))); + bitbase[i] = (uint8_t)b; } // Release allocated memory: