From 8956784f75e9790b059abd9b66b8f2daef2b3e18 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 27 Nov 2011 22:27:00 +0100 Subject: [PATCH] Fix parsing of O-O castling in variant janus The new parser did not realize it meant e1i1 rather than wild e1h1. --- parser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/parser.c b/parser.c index 38ae6b7..de9ee25 100644 --- a/parser.c +++ b/parser.c @@ -356,7 +356,7 @@ badMove:// we failed to find algebraic move ff = (BOARD_WIDTH-1)>>1; // this would be d-file if (boards[yyboardindex][rf][ff] == king) { /* ICS wild castling */ - ft = castlingType == 1 ? BOARD_LEFT+1 : BOARD_RGHT-3; + ft = castlingType == 1 ? BOARD_LEFT+1 : (gameInfo.variant == VariantJanus ? BOARD_RGHT-2 : BOARD_RGHT-3); } else { ff = BOARD_WIDTH>>1; // e-file ft = castlingType == 1 ? BOARD_RGHT-2 : BOARD_LEFT+2; -- 1.7.0.4