Keep track of virginity of back-rank pieces in variant seirawan
[xboard.git] / board.c
diff --git a/board.c b/board.c
index 0bc81f8..fbbb9af 100644 (file)
--- a/board.c
+++ b/board.c
@@ -148,7 +148,7 @@ int pm1X = -1, pm1Y = -1, pm2X = -1, pm2Y = -1;
 void
 SetHighlights (int fromX, int fromY, int toX, int toY)
 {
-    int arrow = hi2X > 0 && IsDrawArrowEnabled();
+    int arrow = hi2X >= 0 && hi1Y >= 0 && IsDrawArrowEnabled();
 
     if (hi1X != fromX || hi1Y != fromY) {
        if (hi1X >= 0 && hi1Y >= 0) {
@@ -181,7 +181,7 @@ SetHighlights (int fromX, int fromY, int toX, int toY)
     hi2X = toX;
     hi2Y = toY;
 
-    if(arrow || toX < 0 && IsDrawArrowEnabled())
+    if(arrow || toX >= 0 && fromY >= 0 && IsDrawArrowEnabled())
        DrawPosition(FALSE, NULL); // repair any arrow damage, or draw a new one
 }
 
@@ -893,7 +893,6 @@ DrawPosition (int repaint, Board board)
     static int lastBoardValid[2] = {0, 0};
     static Board lastBoard[2];
     static char lastMarker[BOARD_RANKS][BOARD_FILES];
-    Arg args[16];
     int rrow, rcol;
     int nr = twoBoards*partnerUp;