Przeglądaj źródła

Merge pull request #1921 from rzuckerm/fix-cmd-line-bug

Make sure command line arguments with whitespace are enclosed in quotes
Brian Fiete 1 rok temu
rodzic
commit
1e21c69bde
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      BeefySysLib/platform/posix/PosixCommon.cpp

+ 1 - 1
BeefySysLib/platform/posix/PosixCommon.cpp

@@ -600,7 +600,7 @@ BFP_EXPORT void BFP_CALLTYPE BfpSystem_SetCommandLine(int argc, char** argv)
 			gCmdLine.Append(' ');
 
 		String arg = argv[i];
-		if ((arg.Contains(' ')) || (arg.Contains('\"')))
+		if (arg.Contains(' ') || arg.Contains('\t') || arg.Contains('\r') || arg.Contains('\n') || arg.Contains('\"'))
 		{
 			arg.Replace("\"", "\\\"");
 			gCmdLine.Append("\"");