1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

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

Make sure command line arguments with whitespace are enclosed in quotes
This commit is contained in:
Brian Fiete 2024-01-16 11:12:33 +01:00 committed by GitHub
commit 1e21c69bde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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("\"");