Sat, 13 Jun 2026 13:24:54 +0200
fix missing cleanup calls in game_play_singlemachine()
| src/main.c | file | annotate | diff | comparison | revisions |
--- a/src/main.c Fri Jun 12 15:32:33 2026 +0200 +++ b/src/main.c Sat Jun 13 13:24:54 2026 +0200 @@ -900,15 +900,18 @@ if (result) { printw("Invalid PGN file content at position %ld:\n%s\n", position, pgn_error_str(result)); + gamestate_cleanup(&gamestate); return; } if (!is_game_running(&gamestate)) { addstr("Game has ended. Use -S to analyze it.\n"); + gamestate_cleanup(&gamestate); return; } curcol = current_color(&gamestate); } else { printw("Can't read PGN file (%s)\n", strerror(errno)); + gamestate_cleanup(&gamestate); return; } }