Author: anonymissimus
Date: Thu May 17 22:06:54 2012
New Revision: 54191

URL: http://svn.gna.org/viewcvs/wesnoth?rev=54191&view=rev
Log:
add an assert (bug #19735)

to ensure we notice out-of-bounds access

Modified:
    trunk/src/replay.cpp

Modified: trunk/src/replay.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/replay.cpp?rev=54191&r1=54190&r2=54191&view=diff
==============================================================================
--- trunk/src/replay.cpp (original)
+++ trunk/src/replay.cpp Thu May 17 22:06:54 2012
@@ -1250,6 +1250,7 @@
                /* process the side parameter and ensure it is within 
boundaries */
                if (unsigned(side - 1) >= resources::teams->size())
                        side = resources::controller->current_side();
+               assert(1 <= side && side <= 
static_cast<int>(resources::teams->size()));
 
                int active_side = side;
                if ((*resources::teams)[active_side - 1].is_local() &&


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to