wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src multiplayer_connect.cpp


From: Philippe Plantier
Subject: [Wesnoth-cvs-commits] wesnoth/src multiplayer_connect.cpp
Date: Sun, 19 Sep 2004 14:47:36 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Philippe Plantier <address@hidden>      04/09/19 18:41:35

Modified files:
        src            : multiplayer_connect.cpp 

Log message:
        For some reason an older version of the file was commited.

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

Patches:
Index: wesnoth/src/multiplayer_connect.cpp
diff -u wesnoth/src/multiplayer_connect.cpp:1.68 
wesnoth/src/multiplayer_connect.cpp:1.69
--- wesnoth/src/multiplayer_connect.cpp:1.68    Sun Sep 19 18:39:20 2004
+++ wesnoth/src/multiplayer_connect.cpp Sun Sep 19 18:41:35 2004
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_connect.cpp,v 1.68 2004/09/19 18:39:20 gruikya Exp $ */
+/* $Id: multiplayer_connect.cpp,v 1.69 2004/09/19 18:41:35 gruikya Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -734,9 +734,13 @@
                                // Choose a random leader type.  
                                std::vector<std::string> types = 
                                        
config::split((*real_sides[choice])["leader"]);
-                               const int lchoice = rand() % types.size();
+                               if (!types.empty()) {
+                                       const int lchoice = rand() % 
types.size();
+                                       (**side)["type"] = types[lchoice];
+                               } else {
+                                       (**side)["type"] = 
(*real_sides[choice])["type"];
+                               }
 
-                               (**side)["type"] = types[lchoice];
                                (**side)["recruit"] = 
(*real_sides[choice])["recruit"];
                                (**side)["music"] = 
(*real_sides[choice])["music"];
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]