From a6e756fc912dd7c895816bd5b117b080bc84b582 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 12 Feb 2013 16:03:36 +0100 Subject: [PATCH] Fix bug in Berolina e.p. capture A move to the e.p. square in Berolina is not always an attempt to capture e.p., but can also be a normal non-capture. The latter were refused, however, because the capture square was always shifted for Pawn moves to the e.p. square. Now it is only done when the move has capture rights associated with it. --- fairymax.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fairymax.c b/fairymax.c index 792ceeb..20b63dd 100644 --- a/fairymax.c +++ b/fairymax.c @@ -187,7 +187,7 @@ int k,q,l,e,E,z,n; /* (q,l)=window, e=current eval. score, E=e.p. sqr.*/ } #endif m=E<16|(E^112)<16&&flag&1&y-E<2&E-y<2?I:m; /* bad castling */ - if(p<3&y==E)H=z&127; /* shift capt.sqr. H if e.p.*/ + if(p<3&y==E&flag)H=z&127; /* shift capt.sqr. H if e.p.*/ t=b[H]; if(flag&1+!t) /* mode (capt/nonc) allowed?*/ {if(t&&(t&16)==k)break; /* capture own */ -- 1.7.0.4