From: H.G.Muller Date: Mon, 8 Feb 2016 12:21:20 +0000 (+0100) Subject: Fix printing of 'x' in position diagram X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=9089c023e881715fe42fe104d24df44489cd3e35;p=xboard.git Fix printing of 'x' in position diagram The times where 'x' was used as PieceToChar result for an empty square are long behind us; 'x' now is a valid piece ID. --- diff --git a/backend.c b/backend.c index 54c16be..3f673a5 100644 --- a/backend.c +++ b/backend.c @@ -16277,7 +16277,7 @@ PrintPosition (FILE *fp, int move) for (i = BOARD_HEIGHT - 1; i >= 0; i--) { for (j = BOARD_LEFT; j < BOARD_RGHT; j++) { char c = PieceToChar(boards[move][i][j]); - fputc(c == 'x' ? '.' : c, fp); + fputc(c == '?' ? '.' : c, fp); fputc(j == BOARD_RGHT - 1 ? '\n' : ' ', fp); } } diff --git a/moves.c b/moves.c index bd516de..92c0371 100644 --- a/moves.c +++ b/moves.c @@ -126,7 +126,7 @@ char PieceToChar (ChessSquare p) { int c; - if((int)p < 0 || (int)p >= (int)EmptySquare) return('x'); /* [HGM] for safety */ + if((int)p < 0 || (int)p >= (int)EmptySquare) return('?'); /* [HGM] for safety */ c = pieceToChar[(int) p]; if(c & 128) c = c & 63 | 64; return c;