Author: mordante
Date: Tue Feb 26 20:37:35 2008
New Revision: 24090
URL: http://svn.gna.org/viewcvs/wesnoth?rev=24090&view=rev
Log:
Fixed an invalid vector access, which could happen since linger mode
didn't reset the player_numer_ (bug #11094). Also added an assert
before the vector access.
Modified:
trunk/changelog
trunk/src/actions.cpp
trunk/src/playmp_controller.cpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=24090&r1=24089&r2=24090&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Tue Feb 26 20:37:35 2008
@@ -7,6 +7,8 @@
* multiplayer:
* messages will no longer default to the private channel when observing
or joining a new game
+ * fixed an invalid vector access, which could happen since linger mode
+ didn't reset the player_numer_ (bug #11094)
* sound:
* added new music track, "Knalgan Theme" by Ryan Reilly.
* added new music track, "The King is Dead" by Mattias Westlund.
Modified: trunk/src/actions.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/actions.cpp?rev=24090&r1=24089&r2=24090&view=diff
==============================================================================
--- trunk/src/actions.cpp (original)
+++ trunk/src/actions.cpp Tue Feb 26 20:37:35 2008
@@ -1936,6 +1936,7 @@
unit_map& units,
std::vector<team>& teams, int team) {
+ assert(team >= 0 && team < teams.size());
teams[team].refog();
for(unit_map::iterator i = units.begin(); i != units.end(); ++i) {
Modified: trunk/src/playmp_controller.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playmp_controller.cpp?rev=24090&r1=24089&r2=24090&view=diff
==============================================================================
--- trunk/src/playmp_controller.cpp (original)
+++ trunk/src/playmp_controller.cpp Tue Feb 26 20:37:35 2008
@@ -297,6 +297,7 @@
quit = true;
try {
// reimplement parts of play_side()
+ player_number_ = first_player_;
turn_data_ = new turn_info(gameinfo_, gamestate_,
status_,
*gui_,map_, teams_,
player_number_,
units_, replay_sender_,
undo_stack_);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits