Fix the parsing of the arguments passed to the app.

Fix the parsing of the arguments passed to the app.

diff --git a/src/engine/platform/systemMain.cpp b/src/engine/platform/systemMain.cpp
index 304e37b..5bdcaad 100644
--- a/src/engine/platform/systemMain.cpp
+++ b/src/engine/platform/systemMain.cpp
@@ -694,6 +694,13 @@ Q_EXPORT sint engineMain( sint argc, valueType * *argv )
         }
         
         Q_strcat( commandLine, sizeof( commandLine ), argv[ i ] );
+        
+        if( containsSpaces )
+        {
+            Q_strcat( commandLine, sizeof( commandLine ), "\"" );
+        }
+
+        Q_strcat( commandLine, sizeof( commandLine ), " " );
     }
     
     consoleCursesSystem->Init();
@@ -715,4 +722,3 @@ Q_EXPORT sint engineMain( sint argc, valueType * *argv )
     
     return 0;
 }
-

GitHub
sha: 034a73b3

© GrangerHub. All rights reserved. Tremulous © Darklegion Development. Granger by err-overflow and MoP licensed CC-BY-SA-2.5