From 22be362b5abb0d3993d75763fda5112b47287cca Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 7 Nov 2017 21:53:01 +0100 Subject: [PATCH] Fix RxK castling from engine in variant seirawan The RxK notation for castling with gating at the Rook square was mistaken for a non-compliant castling notation in games without Fischer castling, and corrected to the compliant notation by adjusting the to-square, assumed to be the Rook. But this backfired for RxK, where it is the King. Now castlings with the to-square on the central file are exempted from this correction. --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index 0328a58..c531656 100644 --- a/backend.c +++ b/backend.c @@ -9057,7 +9057,7 @@ FakeBookMove: // [HGM] book: we jump here to simulate machine moves after book h GameEnds(cps->twoMachinesColor[0] == 'w' ? BlackWins : WhiteWins, buf1, GE_XBOARD); return; - } else if(!appData.fischerCastling) + } else if(!appData.fischerCastling && toX != BOARD_WIDTH>>1) /* [HGM] Kludge to handle engines that send FRC-style castling when they shouldn't (like TSCP-Gothic) */ switch(moveType) { -- 1.7.0.4