From: H.G. Muller Date: Sun, 15 Nov 2009 06:05:12 +0000 (-0800) Subject: fix castling rights when copying FEN to clipboard X-Git-Tag: master-20091122~11 X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=10ed9918ea4c8800ff297ae7dc7a8c5f90ad06ff fix castling rights when copying FEN to clipboard This patch forces leaving of Edit-Position mode before copying a FEN to the clipboard, to make sure castling rights are faked in a consistent way. Before you could get FENs that had castling rights for non-existent Rooks. --- diff --git a/winboard/wclipbrd.c b/winboard/wclipbrd.c index 111bcf9..f13e77f 100644 --- a/winboard/wclipbrd.c +++ b/winboard/wclipbrd.c @@ -50,6 +50,7 @@ CopyFENToClipboard() { char *fen = NULL; + if(gameMode == EditPosition) EditPositionDone(TRUE); // [HGM] mak sure castling rights are set consistently fen = PositionToFEN(currentMove, NULL); if (!fen) { DisplayError("Unable to convert position to FEN.", 0);