X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=575fc26da2880ddeb567ef14b154909ea0d70d8b;hb=bd6a2045cc5dddf174d4240a460c76e199a4cac5;hp=b43a970a39d0b4d87e84a8f94155c0cac93493b7;hpb=515cd3f7b2ca2d5ba4450fc8bd8576c7602fe41d;p=xboard.git diff --git a/backend.c b/backend.c index b43a970..575fc26 100644 --- a/backend.c +++ b/backend.c @@ -7207,7 +7207,7 @@ LeftClick (ClickType clickType, int xPix, int yPix) } promoDefaultAltered = FALSE; MarkTargetSquares(1); - if(!second || appData.oneClick && !OnlyMove(&x, &y, TRUE)) { + if(!(second && appData.oneClick && OnlyMove(&x, &y, TRUE))) { if (appData.highlightDragging) { SetHighlights(x, y, -1, -1); } else { @@ -7257,6 +7257,7 @@ LeftClick (ClickType clickType, int xPix, int yPix) second = sweepSelecting = 0; fromX = fromY = -1; gatingPiece = EmptySquare; + MarkTargetSquares(1); ClearHighlights(); gotPremove = 0; ClearPremoveHighlights(); @@ -8013,6 +8014,7 @@ SendMoveToBookUser (int moveNr, ChessProgramState *cps, int initial) SendToProgram("force\n", cps); cps->bookSuspend = TRUE; // flag indicating it has to be restarted } + if(bookHit) setboardSpoiledMachineBlack = FALSE; // suppress 'go' in SendMoveToProgram if(!initial) SendMoveToProgram(moveNr, cps); // with hit on initial position there is no move // now arrange restart after book miss if(bookHit) { @@ -15224,7 +15226,7 @@ void CreateBookEvent () { ListGame * lg = (ListGame *) gameList.head; - FILE *f; + FILE *f, *g; int nItem; static int secondTime = FALSE; @@ -15233,8 +15235,8 @@ CreateBookEvent () return; } - if(!secondTime && (f = fopen(appData.polyglotBook, "r"))) { - fclose(f); + if(!secondTime && (g = fopen(appData.polyglotBook, "r"))) { + fclose(g); secondTime++; DisplayNote(_("Book file exists! Try again for overwrite.")); return;