From 9089c023e881715fe42fe104d24df44489cd3e35 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Mon, 8 Feb 2016 13:21:20 +0100 Subject: [PATCH] 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. --- backend.c | 2 +- moves.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 1.7.0.4