The expansion of the number of piece types to > 64 had broken the
accounting of castling rights, because the code for NoRights is also
a piece code (as it is stored in the board), and had gotten a value
so high that it could no longer be stored as signed char. This is
solved by declaring the initialRights array as unsigned char instead.
 Board boards[MAX_MOVES];
 /* [HGM] Following 7 needed for accurate legality tests: */
 signed char  castlingRank[BOARD_FILES]; // and corresponding ranks
-signed char  initialRights[BOARD_FILES];
+unsigned char initialRights[BOARD_FILES];
 int   nrCastlingRights; // For TwoKings, or to implement castling-unknown status
 int   initialRulePlies, FENrulePlies;
 FILE  *serverMoves = NULL; // next two for broadcasting (/serverMoves option)
 
 int SameColor P((ChessSquare, ChessSquare));
 int PosFlags(int index);
 
-extern signed char initialRights[BOARD_FILES]; /* [HGM] all rights enabled, set in InitPosition */
 int quickFlag;
 char *pieceDesc[EmptySquare];
 char *defaultDesc[EmptySquare] = {
 
 extern char *yy_text;  /* Needed because yytext can be either a char[]
                          or a (non-constant) char* */
 extern int yyoffset P((void));
-extern signed char initialRights[BOARD_FILES];
+extern unsigned char initialRights[BOARD_FILES];
 extern signed char  castlingRank[BOARD_FILES];