Bugfix legality null move in parsing with -testLegality off
authorH.G. Muller <h.g.muller@hccnet.nl>
Fri, 8 Jan 2010 08:21:04 +0000 (09:21 +0100)
committerArun Persaud <arun@nubati.net>
Wed, 13 Jan 2010 03:31:12 +0000 (19:31 -0800)
The pointers were compared, in stead of the values.
Also in stead of rejecting null moves with legality testing off, it rejected moves on the main diagonal.

backend.c

index b9348a9..4dab307 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -4349,7 +4349,7 @@ ParseOneMove(move, moveNum, moveType, fromX, fromY, toX, toY, promoChar)
        if (appData.testLegality) {
          return (*moveType != IllegalMove);
        } else {
-         return !(fromX == fromY && toX == toY);
+         return !(*fromX == *toX && *fromY == *toY);
        }
 
       case WhiteDrop: