bb: Fix buffer overflow

This commit is contained in:
Calcitem 2020-05-16 01:41:03 +08:00
parent 333641845a
commit 68b89788fd
2 changed files with 6 additions and 6 deletions

View File

@ -23,10 +23,10 @@
#include "misc.h"
uint8_t PopCnt16[1 << 16];
uint8_t SquareDistance[SQUARE_COUNT][SQUARE_COUNT];
uint8_t SquareDistance[SQ_32][SQ_32];
bitboard_t SquareBB[SQUARE_COUNT];
bitboard_t LineBB[SQUARE_COUNT][SQUARE_COUNT];
bitboard_t SquareBB[SQ_32];
bitboard_t LineBB[SQUARE_COUNT][SQ_32];
/// Bitboards::pretty() returns an ASCII representation of a bitboard suitable
/// to be printed to standard output. Useful for debugging.

View File

@ -72,10 +72,10 @@ constexpr bitboard_t Seat7 = Seat1 << 6;
constexpr bitboard_t Seat8 = Seat1 << 7;
extern uint8_t PopCnt16[1 << 16];
extern uint8_t SquareDistance[SQUARE_COUNT][SQUARE_COUNT];
extern uint8_t SquareDistance[SQ_32][SQ_32];
extern bitboard_t SquareBB[SQUARE_COUNT];
extern bitboard_t LineBB[SQUARE_COUNT][SQUARE_COUNT];
extern bitboard_t SquareBB[SQ_32];
extern bitboard_t LineBB[SQUARE_COUNT][SQ_32];
inline bitboard_t square_bb(square_t s)
{