X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=fairymax.c;h=30396a2a6ba83141956f84d2cf71970aebea6fe8;hb=d977883a755c4d0830ed9363e6cc853fd47ee18a;hp=c135fb661b6aa17d0a459ffc04d4c0709e90e3ac;hpb=d49765690831138d5d4debc822c71398bd72df36;p=fairymax.git diff --git a/fairymax.c b/fairymax.c index c135fb6..30396a2 100644 --- a/fairymax.c +++ b/fairymax.c @@ -18,7 +18,7 @@ /*****************************************************************/ #define MULTIPATH -#define VERSION "4.8P" +#define VERSION "4.8Q" #include #include @@ -412,7 +412,7 @@ void CopyBoard(int s) void PrintVariants(int combo) { - int i, j, count=0, total=0; char c, buf[80]; + int i, j, count=0, total=0; char c=EOF+1, buf[80]; FILE *f; f = fopen(INI_FILE, "r"); @@ -866,6 +866,7 @@ int main(int argc, char **argv) else { int i=-1; if(b[L] && (b[L]&16) == Side && w[b[L]&15] < 0) // capture own King: castling { i=K; K = L; L = i>L ? i-1 : i+2; } + if(w[GT&15] < -1) pl[GT&31]++, J+=89729; // promotion to royal piece if(b[K]&32) GT = 0; // non-virgin mover => true promotion rather than gating if(D(Side,-I,I,Q,O,LL|S,3)!=I) { /* did have move syntax, but illegal move */