From 10ed9918ea4c8800ff297ae7dc7a8c5f90ad06ff Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 14 Nov 2009 22:05:12 -0800 Subject: [PATCH] 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. --- winboard/wclipbrd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 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); -- 1.7.0.4