Fix erasing of premove highlights XB
authorH.G.Muller <hgm@hgm-xboard.(none)>
Tue, 29 Mar 2016 14:30:50 +0000 (16:30 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Tue, 29 Mar 2016 14:51:35 +0000 (16:51 +0200)
The to-square premove highlight was not marked for erasure (but
the from-square was marked twice if the to-square higlight  changed),
leading to accumulation of highlighted squares during PV walking.

board.c

diff --git a/board.c b/board.c
index 30cea29..f691696 100644 (file)
--- a/board.c
+++ b/board.c
@@ -194,7 +194,7 @@ SetPremoveHighlights (int fromX, int fromY, int toX, int toY)
     }
     if (pm2X != toX || pm2Y != toY) {
        if (pm2X >= 0 && pm2Y >= 0) {
-           damage[0][pm1Y][pm1X] |= 2;
+           damage[0][pm2Y][pm2X] |= 2;
        }
     }
     pm1X = fromX;