From: H.G. Muller Date: Tue, 16 Nov 2010 10:15:52 +0000 (+0100) Subject: Remember promotion char in game history X-Git-Tag: 4.8Q~18 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=a470951095b2ab90dbe7c256d42546b60d63299f;p=fairymax.git Remember promotion char in game history Undo did not work when there were under-promotions in the game. --- diff --git a/fairymax.c b/fairymax.c index 3a89dd5..bb842da 100644 --- a/fairymax.c +++ b/fairymax.c @@ -68,10 +68,10 @@ int StartKey; #endif /* make unique integer from engine move representation */ -#define PACK_MOVE 256*K + L; +#define PACK_MOVE 256*K + L + (PromPiece << 16); /* convert intger argument back to engine move representation */ -#define UNPACK_MOVE(A) K = (A)>>8 & 255; L = (A) & 255; +#define UNPACK_MOVE(A) K = (A)>>8 & 255; L = (A) & 255; PromPiece = (A)>>16 & 255; /* Global variables visible to engine. Normally they */ /* would be replaced by the names under which these */