497 if (settings->continuepgn) { |
497 if (settings->continuepgn) { |
498 FILE *pgnfile = fopen(settings->continuepgn, "r"); |
498 FILE *pgnfile = fopen(settings->continuepgn, "r"); |
499 if (pgnfile) { |
499 if (pgnfile) { |
500 int result = read_pgn(pgnfile, &gamestate, &(settings->gameinfo)); |
500 int result = read_pgn(pgnfile, &gamestate, &(settings->gameinfo)); |
501 fclose(pgnfile); |
501 fclose(pgnfile); |
502 if (result != EXIT_SUCCESS) { |
502 if (result) { |
503 addstr("Invalid PGN file content.\n"); |
503 addstr("Invalid PGN file content.\n"); |
504 return; |
504 return; |
505 } |
505 } |
506 if (!is_game_running(&gamestate)) { |
506 if (!is_game_running(&gamestate)) { |
507 addstr("Game has ended. Use -S to analyze it.\n"); |
507 addstr("Game has ended. Use -S to analyze it.\n"); |