Print score with same sign in message and engine output
[xboard.git] / backend.c
index 0624dac..f231bc0 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -7051,6 +7051,7 @@ UserMoveEvent (int fromX, int fromY, int toX, int toY, int promoChar)
                            "fromY %d, toX %d, toY %d\n",
                            fromX, fromY, toX, toY);
            }
+            DrawPosition(TRUE, boards[currentMove]); // [HGM] repair animation damage done by premove (in particular emptying from-square)
             return;
        }
        break;
@@ -7072,6 +7073,7 @@ UserMoveEvent (int fromX, int fromY, int toX, int toY, int promoChar)
                            "fromY %d, toX %d, toY %d\n",
                            fromX, fromY, toX, toY);
            }
+            DrawPosition(TRUE, boards[currentMove]);
             return;
        }
        break;
@@ -9764,6 +9766,7 @@ FakeBookMove: // [HGM] book: we jump here to simulate machine moves after book h
                     [AS] Protect the thinkOutput buffer from overflow... this
                     is only useful if buf1 hasn't overflowed first!
                 */
+               if((gameMode == AnalyzeMode && appData.whitePOV || appData.scoreWhite) && !WhiteOnMove(forwardMostMove)) curscore *= -1;
                if(curscore >= MATE_SCORE) 
                    snprintf(score_buf, MSG_SIZ, "#%d", curscore - MATE_SCORE);
                else if(curscore <= -MATE_SCORE)