mail[Wesnoth-commits] r28894 - in /trunk/src: playmp_controller.cpp replay_controller.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by esr on August 23, 2008 - 21:44:
Author: esr
Date: Sat Aug 23 21:30:56 2008
New Revision: 28894

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28894&view=rev
Log:
Fix two more pesky off-by-one errors.

Modified:
    trunk/src/playmp_controller.cpp
    trunk/src/replay_controller.cpp

Modified: trunk/src/playmp_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playmp_controller.cpp?rev=28894&r1=28893&r2=28894&view=diff
==============================================================================
--- trunk/src/playmp_controller.cpp (original)
+++ trunk/src/playmp_controller.cpp Sat Aug 23 21:30:56 2008
@@ -81,7 +81,7 @@
                player_type_changed_ = false;
                end_turn_ = false;
 
-               statistics::reset_turn_stats(teams_[team_index].save_id());
+               statistics::reset_turn_stats(teams_[team_index-1].save_id());
 
                // we can't call playsingle_controller::play_side because
                // we need to catch exception here

Modified: trunk/src/replay_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/replay_controller.cpp?rev=28894&r1=28893&r2=28894&view=diff
==============================================================================
--- trunk/src/replay_controller.cpp (original)
+++ trunk/src/replay_controller.cpp Sat Aug 23 21:30:56 2008
@@ -332,7 +332,7 @@
        // If a side is empty skip over it.
        if (current_team().is_empty()) return;
 
-       statistics::reset_turn_stats(teams_[team_index].save_id());
+       statistics::reset_turn_stats(teams_[team_index-1].save_id());
 
        try{
                play_controller::init_side(player_number_ - 1, true);




Related Messages


Powered by MHonArc, Updated Sat Aug 23 22:01:54 2008