From 8f1df62f9ff3091a9d2677b9e0417c50ca863ca2 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 24 Apr 2012 14:57:12 +0200 Subject: [PATCH] Recognize drop moves as illegal move An @-sign as second character now makes Fairy-Max recognize the input as a move, so that the Illegal-move response is given rather than the Unknown-command response. It is not really checked if the encoding of the drop move accidentally coincide with that of a legal move. --- fairymax.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fairymax.c b/fairymax.c index 931099a..91fe48d 100644 --- a/fairymax.c +++ b/fairymax.c @@ -884,7 +884,7 @@ int main(int argc, char **argv) GT = (Side == WHITE ? piecetype : blacktype)[line[4]&31]; if(GT) PromPiece = (Side == WHITE ? 7 : 7+pm) - GT, GT |= 32 + Side; {char *c=line; K=c[0]-16*c[1]+799;L=c[2]-16*c[3]+799; } - if (m) + if (m & line[1] != '@') /* doesn't have move syntax */ printf("Error (unknown command): %s\n", command); else { int i=-1; -- 1.7.0.4