From d30d12e2d31771571fec432198b17a485a8881c7 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Thu, 25 Sep 2014 11:14:06 +0200 Subject: [PATCH] Prevent multi-path moves from parsing as ambiguous In Cylinder Chess the MovesFromString() generator might generate duplicate moves, one wrapping, the other direct. When they were both counted as matching the SAN input move, Disambiguate() would think it an ambiguous move. So a move that came from the same square as the one we already have must not be counted. --- moves.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/moves.c b/moves.c index a3eebcc..29638b8 100644 --- a/moves.c +++ b/moves.c @@ -1815,6 +1815,8 @@ DisambiguateCallback (Board board, int flags, ChessMove kind, int rf, int ff, in (cl->rtIn == -1 || cl->rtIn == rt || wildCard) && (cl->ftIn == -1 || cl->ftIn == ft || wildCard)) { + if(cl->count && rf == cl->rf && ff == cl->ff) return; // duplicate move + cl->count++; if(cl->count == 1 || board[rt][ft] != EmptySquare) { // [HGM] oneclick: if multiple moves, be sure we remember capture -- 1.7.0.4