Avoid an assertion failure triggered in the replays.
This commit is contained in:
parent
7690221e3e
commit
e171ebfa40
2 changed files with 9 additions and 1 deletions
|
@ -57,6 +57,7 @@ Version 1.3.12+svn:
|
|||
* loading a content with invalid wml does not terminate the game
|
||||
* increased the precission off the mouse in the top row of the editor
|
||||
(closes bug #10219)
|
||||
* Avoid an assertion failure triggered in the replays
|
||||
|
||||
Version 1.3.12:
|
||||
* campaigns:
|
||||
|
|
|
@ -284,7 +284,14 @@ void replay_controller::play_turn(){
|
|||
(!recorder.at_end())){
|
||||
|
||||
play_side(player_number_ - 1, false);
|
||||
play_slice();
|
||||
// NOTE play_side increased player_number_ so play_slice can start with
|
||||
// a player number which is an invalid team. The other question is why
|
||||
// do we send the player number to play_side if it has access to it.
|
||||
// If player_number_ > teams_.size() we will later trigger the assert in
|
||||
// play_controller::current_team().
|
||||
if(static_cast<size_t>(player_number_) <= teams_.size()) {
|
||||
play_slice();
|
||||
}
|
||||
}
|
||||
|
||||
player_number_ = 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue