mail[Wesnoth-commits] r24416 - /trunk/src/game.cpp


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

Header


Content

Posted by koraq on March 08, 2008 - 18:52:
Author: mordante
Date: Sat Mar  8 18:52:51 2008
New Revision: 24416

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24416&view=rev
Log:
Allow './wesnoth -t starting_dir' to work again. Added comment that the 
current 
way is a bit ambiguous.

Modified:
    trunk/src/game.cpp

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=24416&r1=24415&r2=24416&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Sat Mar  8 18:52:51 2008
@@ -250,7 +250,10 @@
                        break; //parse the rest of the arguments when we set 
up the game
                } else if(val == "--test" || val == "-t") {
                        test_mode_ = true;
-                       if(arg_ + 1 != argc_ && argv_[arg_ + 1][0] != '-') {
+                       // If we have -t foo it's ambiguous whether it foo is 
the parameter
+                       // for Wesnoth or the start directory so we assume 
it's the starting
+                       // directory.
+                       if(arg_ + 2 < argc_ && argv_[arg_ + 1][0] != '-') {
                                ++arg_;
                                test_scenario_ = argv_[arg_];
                        }




Related Messages


Powered by MHonArc, Updated Sat Mar 08 19:01:42 2008