CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Jon Daniel <[EMAIL PROTECTED]> 05/06/03 17:40:02
Modified files:
src : playturn.cpp
Log message:
fixed bug #13086 again
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playturn.cpp.diff?tr1=1.376&tr2=1.377&r1=text&r2=text
Patches:
Index: wesnoth/src/playturn.cpp
diff -u wesnoth/src/playturn.cpp:1.376 wesnoth/src/playturn.cpp:1.377
--- wesnoth/src/playturn.cpp:1.376 Fri Jun 3 12:18:13 2005
+++ wesnoth/src/playturn.cpp Fri Jun 3 17:40:02 2005
@@ -1,4 +1,4 @@
-/* $Id: playturn.cpp,v 1.376 2005/06/03 12:18:13 j_daniel Exp $ */
+/* $Id: playturn.cpp,v 1.377 2005/06/03 17:40:02 j_daniel Exp $ */
/*
Copyright (C) 2003 by David White <[EMAIL PROTECTED]>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -2542,7 +2542,12 @@
if(j != data.end()) {
const std::string side(data.begin(),j);
const std::string player(j+1,data.end());
- const int side_num = lexical_cast<int,
std::string>(side);
+ int side_num;
+ try {
+ side_num = lexical_cast<int, std::string>(side);
+ } catch(bad_lexical_cast& bad_lexical) {
+ return;
+ }
if(side_num > 0 && side_num <= teams_.size()) {
if(teams_[static_cast<size_t>(side_num -
1)].is_human()) {
change_side_controller(side,player,true);