wesnoth/changelog_entries/fix_add_start.md
Steve Cotton f5f76ade9a Avoid an assert in replay::add_start_if_not_there_yet with corrupt files
With this it puts the player back to the title screen after showing
an error dialog, so it's not much better, but at least it's not a
crash.

Fixes issue 7164. We weren't able to work out what caused the file corruption
reported, but I believe it's a race condition about saving while the AI is
recruiting. The file in the bug report has a `[snapshot]` tag with
`init_side_done=yes` but without a `playing_team` attribute, which must be the
result of `game_state::write()` when not in the `PLAY` phase. Loading such a
file causes `game_state::start_event_fired_ == false`, and triggers
`play_controller::start_game` to call `replay::add_start_if_not_there_yet`.

The i18n'd string is reused from `game_launcher.cpp`.
2023-10-21 20:31:21 +02:00

127 B

Miscellaneous and Bug Fixes

  • Avoid an assert in replay::add_start_if_not_there_yet with corrupt files (issue #7154)