From: H.G. Muller Date: Tue, 24 Apr 2012 12:57:12 +0000 (+0200) Subject: Recognize drop moves as illegal move X-Git-Tag: 4.8S~18 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=8f1df62f9ff3091a9d2677b9e0417c50ca863ca2;p=fairymax.git 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. --- 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;