Fix e.p. bug in xiangqi with -serverMoves option
authorH.G. Muller <h.g.muller@hccnet.nl>
Fri, 28 May 2010 09:07:06 +0000 (11:07 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Fri, 28 May 2010 09:07:06 +0000 (11:07 +0200)
Sideway Pawn moves were written as e.p. captures in the file with moves,
which led to disappearence of pieces in the viewer.

backend.c

index f5f9f99..742bf03 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -8581,7 +8581,7 @@ MakeMove(fromX, fromY, toX, toY, promoChar)
         if( (boards[forwardMostMove][fromY][fromX] == WhitePawn ||
              boards[forwardMostMove][fromY][fromX] == BlackPawn   ) &&
              boards[forwardMostMove][toY][toX] == EmptySquare
-             && fromX != toX )
+             && fromX != toX && fromY != toY)
                 fprintf(serverMoves, ":%c%c:%c%c", AAA+fromX, ONE+fromY, AAA+toX, ONE+fromY);
         // promotion suffix
         if(promoChar != NULLCHAR)