From: H.G. Muller Date: Sun, 11 Oct 2009 21:48:55 +0000 (-0700) Subject: fix for bug #27668: e.p. field still not passed to engine X-Git-Tag: v4.4.1.20091019~28 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=2fc6fd0719e5aa3e94bdb80b581d849a2ebb4d0f;p=xboard.git fix for bug #27668: e.p. field still not passed to engine PositionToFEN now takes the e.p. rights from epStatus[moveNr], rather than calculating it on the spot from moveList[moveNr-1] (which failed on the first move). --- diff --git a/backend.c b/backend.c index afd2196..29f55db 100644 --- a/backend.c +++ b/backend.c @@ -13498,6 +13498,14 @@ PositionToFEN(move, overrideCastling) } else { *p++ = '-'; } + } else if(move == backwardMostMove) { + // [HGM] perhaps we should always do it like this, and forget the above? + if(epStatus[move] >= 0) { + *p++ = epStatus[move] + AAA; + *p++ = whiteToPlay ? '6'+BOARD_HEIGHT-8 : '3'; + } else { + *p++ = '-'; + } } else { *p++ = '-'; }