From 3a9f2a234bc27b03d18e7096aaa0055f3d559390 Mon Sep 17 00:00:00 2001 From: Ron Zuckerman Date: Sat, 20 Jan 2024 14:49:28 -0600 Subject: [PATCH] Bug fix for empty command-line arguments --- BeefySysLib/platform/posix/PosixCommon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeefySysLib/platform/posix/PosixCommon.cpp b/BeefySysLib/platform/posix/PosixCommon.cpp index 71780355..c8788d36 100644 --- a/BeefySysLib/platform/posix/PosixCommon.cpp +++ b/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('\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("\"", "\\\""); gCmdLine.Append("\"");