]> git.sesse.net Git - pgn-extract/commitdiff
Kill games with null moves.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 16 Dec 2014 00:41:43 +0000 (01:41 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 16 Dec 2014 00:41:43 +0000 (01:41 +0100)
output.c

index 9c57e3195f1678ddf9db3e5f3421cd19b26c6597..7a1b325adfdb7c0b85f61e0537252751262e667b 100644 (file)
--- a/output.c
+++ b/output.c
@@ -1180,6 +1180,10 @@ output_sesse_bin_game(Game current_game,FILE *outputfile,
 
     // Find the result. Skip games with no result.
     for (move = current_game.moves; move != NULL; move = move->next) {
+        if (move->class == NULL_MOVE) {
+            // Skip games with null moves.
+            return;
+        }
         if (move->terminating_result) {
             result = move->terminating_result;
         }