From: H.G.Muller Date: Thu, 25 Sep 2014 09:14:06 +0000 (+0200) Subject: Prevent multi-path moves from parsing as ambiguous X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d30d12e2d31771571fec432198b17a485a8881c7;p=xboard.git 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. --- 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