From: Joost VandeVondele Date: Sat, 26 Nov 2016 14:13:58 +0000 (+0100) Subject: Fix undefined behavior X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=8ceb1ff53bf4b9aa9609d39f11bcb540a70ce4a5;ds=inline Fix undefined behavior This fixes #892. Undefined behavior as seen with clang -fsanitize=undefined. No functional change. --- diff --git a/src/types.h b/src/types.h index 519f6af8..a95420ca 100644 --- a/src/types.h +++ b/src/types.h @@ -209,7 +209,7 @@ const Piece Pieces[] = { W_PAWN, W_KNIGHT, W_BISHOP, W_ROOK, W_QUEEN, W_KING, B_PAWN, B_KNIGHT, B_BISHOP, B_ROOK, B_QUEEN, B_KING }; extern Value PieceValue[PHASE_NB][PIECE_NB]; -enum Depth { +enum Depth : int { ONE_PLY = 1,