return;
}
- // Find Black and White Elos. Skip games with no Elo.
+ // Find Black and White Elos.
const char *white_elo_tag = current_game.tags[WHITE_ELO_TAG];
const char *black_elo_tag = current_game.tags[BLACK_ELO_TAG];
- if (white_elo_tag == NULL || black_elo_tag == NULL) {
- return;
+ int white_elo = 0, black_elo = 0;
+ if (white_elo_tag) {
+ white_elo = atoi(white_elo_tag);
+ }
+ if (black_elo_tag) {
+ black_elo = atoi(black_elo_tag);
}
-
- int white_elo = atoi(white_elo_tag);
- int black_elo = atoi(black_elo_tag);
int file_num = current_game.file_number;
long start_position = current_game.start_position;