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];
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);
fwrite(&black_elo, sizeof(black_elo), 1, outputfile);
fwrite(&opening, sizeof(opening), 1, outputfile);
fwrite(×tamp, 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);
}
}