From a470951095b2ab90dbe7c256d42546b60d63299f Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 16 Nov 2010 11:15:52 +0100 Subject: [PATCH] Remember promotion char in game history Undo did not work when there were under-promotions in the game. --- fairymax.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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 */ -- 1.7.0.4