Fix SAN of promoted Chu pieces
authorH.G. Muller <h.g.muller@hccnet.nl>
Fri, 4 Oct 2013 08:24:34 +0000 (10:24 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Sun, 22 Dec 2013 22:32:04 +0000 (23:32 +0100)
moves.c

diff --git a/moves.c b/moves.c
index 9143842..dbf3924 100644 (file)
--- a/moves.c
+++ b/moves.c
@@ -1936,7 +1936,7 @@ CoordsToAlgebraic (Board board, int flags, int rf, int ff, int rt, int ft, int p
        */
         if( c == '~' || c == '+') {
            /* [HGM] print nonexistent piece as its demoted version */
-           piece = (ChessSquare) (DEMOTED piece);
+           piece = (ChessSquare) (DEMOTED piece - 11*(gameInfo.variant == VariantChu));
         }
         if(c=='+') *outp++ = c;
         *outp++ = ToUpper(PieceToChar(piece));