From 2fc6fd0719e5aa3e94bdb80b581d849a2ebb4d0f Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 11 Oct 2009 14:48:55 -0700 Subject: [PATCH] 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). --- backend.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) 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++ = '-'; } -- 1.7.0.4