Fix null move
authorH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 4 Jul 2022 17:57:25 +0000 (19:57 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 4 Jul 2022 17:57:25 +0000 (19:57 +0200)
backend.c

index 9460ad0..c56b796 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -7444,8 +7444,10 @@ FinishMove (ChessMove moveType, int fromX, int fromY, int toX, int toY, int prom
        bookHit = SendMoveToBookUser(forwardMostMove-1, &first, FALSE);
        first.maybeThinking = TRUE;
     } else if(fromY == DROP_RANK && fromX == EmptySquare) {
+      if(PosFlags(0) & F_NULL_MOVE) SendMoveToProgram(currentMove, &first); else {
        if(!first.useSetboard) SendToProgram("undo\n", &first); // kludge to change stm in engines that do not support setboard
        SendBoard(&first, currentMove+1);
+      }
        if(second.analyzing) {
            if(!second.useSetboard) SendToProgram("undo\n", &second);
            SendBoard(&second, currentMove+1);