src/game.c

changeset 59
3fa1de896666
parent 55
54ea19938d57
child 60
0c50aac49e55
equal deleted inserted replaced
58:7ba8a97a8b6e 59:3fa1de896666
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");

mercurial