From f3232c478fb5fd9c1fd6fc767b5c8c8320ab8209 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 12 Dec 2014 02:07:54 +0100 Subject: [PATCH] Store the move as part of the value now, not the key. Means better transposition handling. --- output.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/output.c b/output.c index bc19a4a..a17d5b1 100644 --- a/output.c +++ b/output.c @@ -1232,9 +1232,8 @@ output_sesse_bin_game(Game current_game,FILE *outputfile, unsigned int opening = move->eco ? move->eco->cumulative_hash_value : 0; // Truncate to 32 bits. // key - putc(move->bpfen_len + strlen((char *)move->move), outputfile); + putc(move->bpfen_len, outputfile); fwrite(move->bpfen, move->bpfen_len, 1, outputfile); - fwrite(move->move, strlen((char *)move->move), 1, outputfile); // value putc(result_int, outputfile); @@ -1242,6 +1241,8 @@ output_sesse_bin_game(Game current_game,FILE *outputfile, fwrite(&black_elo, sizeof(black_elo), 1, outputfile); fwrite(&opening, sizeof(opening), 1, outputfile); fwrite(×tamp, sizeof(timestamp), 1, outputfile); + putc(strlen((char *)move->move), outputfile); + fwrite(move->move, strlen((char *)move->move), 1, outputfile); } } -- 2.39.2