]> git.sesse.net Git - pgn-extract/blobdiff - output.c
Store start position in the binary output.
[pgn-extract] / output.c
index a17d5b1653cc54c86cc19728560130676478f222..9ba84c101cfa51570d18f4a908de6392e5a750e2 100644 (file)
--- a/output.c
+++ b/output.c
@@ -1205,6 +1205,7 @@ output_sesse_bin_game(Game current_game,FILE *outputfile,
 
     int white_elo = atoi(white_elo_tag);
     int black_elo = atoi(black_elo_tag);
+    long start_position = current_game.start_position;
 
     // Parse date and time, if it exists. Set invalid dates to year 3000.
     const char *date_tag = current_game.tags[DATE_TAG];
@@ -1241,6 +1242,7 @@ output_sesse_bin_game(Game current_game,FILE *outputfile,
         fwrite(&black_elo, sizeof(black_elo), 1, outputfile);
         fwrite(&opening, sizeof(opening), 1, outputfile);
         fwrite(&timestamp, sizeof(timestamp), 1, outputfile);
+        fwrite(&start_position, sizeof(start_position), 1, outputfile);
         putc(strlen((char *)move->move), outputfile);
         fwrite(move->move, strlen((char *)move->move), 1, outputfile);
     }