CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Guillaume Melquiond <[EMAIL PROTECTED]> 05/03/19 13:55:49

Modified files:
        src            : game_events.cpp 

Log message:
        A size_t value can't be negative.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game_events.cpp.diff?tr1=1.129&tr2=1.130&r1=text&r2=text

Patches:
Index: wesnoth/src/game_events.cpp
diff -u wesnoth/src/game_events.cpp:1.129 wesnoth/src/game_events.cpp:1.130
--- wesnoth/src/game_events.cpp:1.129   Sat Mar 19 13:02:34 2005
+++ wesnoth/src/game_events.cpp Sat Mar 19 13:55:48 2005
@@ -1,4 +1,4 @@
-/* $Id: game_events.cpp,v 1.129 2005/03/19 13:02:34 gruikya Exp $ */
+/* $Id: game_events.cpp,v 1.130 2005/03/19 13:55:48 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <[EMAIL PROTECTED]>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -460,7 +460,7 @@
                const std::string& type = cfg["type"];
                const std::string& side = cfg["side"];
                size_t side_num = atoi(side.c_str())-1;
-               if(side_num < 0 || side_num >= teams->size()) side_num = 0;
+               if (side_num >= teams->size()) side_num = 0;
 
                const unit_race::GENDER gender = cfg["gender"] == "female" ? 
unit_race::FEMALE : unit_race::MALE;
                const game_data::unit_type_map::const_iterator itor = 
game_data_ptr->unit_types.find(type);


Reply via email to