1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-14 14:24:10 +02:00

Merge pull request #1925 from rzuckerm/empty-command-line-args

Bug fix for empty command-line arguments
This commit is contained in:
Brian Fiete 2024-01-20 23:10:41 +01:00 committed by GitHub
commit 45771ae48e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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