[Marble-commits] KDE/kdeedu/marble/src

Dennis Nienhüser earthwings at gentoo.org
Mon Dec 21 20:09:06 CET 2009


SVN commit 1064779 by nienhueser:

Fix command line parsing for --debug-info as last argument

 M  +2 -2      qtmain.cpp  


--- trunk/KDE/kdeedu/marble/src/qtmain.cpp #1064778:1064779
@@ -87,12 +87,12 @@
     QString marbleDataPath;
     int dataPathIndex=0;
 
-    for ( int i = 1; i < argc - 1; ++i ) {
+    for ( int i = 1; i < argc; ++i ) {
         if ( strcmp( argv[ i ], "--debug-info" ) == 0 )
         {
             MarbleDebug::enable = true;
         }
-        if ( strcmp( argv[ i ], "--marbleDataPath" ) == 0 )
+        if ( strcmp( argv[ i ], "--marbleDataPath" ) == 0 && i + 1 < argc )
         {
             dataPathIndex = i + 1;
             marbleDataPath = argv[ dataPathIndex ];


More information about the Marble-commits mailing list