diff --git a/Source/Engine/Engine/CommandLine.cpp b/Source/Engine/Engine/CommandLine.cpp index d2b5fa374..0afcdaac9 100644 --- a/Source/Engine/Engine/CommandLine.cpp +++ b/Source/Engine/Engine/CommandLine.cpp @@ -140,9 +140,8 @@ bool CommandLine::Parse(const StringView& commandLine, Array& args) i++; if (i == length) break; - if (commandLine[i] == '-') - i++; - else if (commandLine[i] == '/') + bool hasArgPrefix = commandLine[i] == '-' || commandLine[i] == '/'; + if (hasArgPrefix) i++; // Skip white space @@ -159,7 +158,7 @@ bool CommandLine::Parse(const StringView& commandLine, Array& args) StringView name = commandLine.Substring(nameStart, nameEnd - nameStart); // If previous argument was empty and this one is a quote then assume it's a value for the previous argument (without '=') - if (wholeQuote && addedEmptyArg) + if ((wholeQuote || !hasArgPrefix) && addedEmptyArg) { args.Last().Value = name; i++; @@ -177,7 +176,7 @@ bool CommandLine::Parse(const StringView& commandLine, Array& args) addedEmptyArg = true; if (wholeQuote) i++; - if (i < length && commandLine[i] != '\"') + if (i < length && commandLine[i] == '\"') i++; continue; } diff --git a/Source/Engine/Platform/Linux/LinuxPlatform.cpp b/Source/Engine/Platform/Linux/LinuxPlatform.cpp index e8e23967a..50f05e543 100644 --- a/Source/Engine/Platform/Linux/LinuxPlatform.cpp +++ b/Source/Engine/Platform/Linux/LinuxPlatform.cpp @@ -1981,7 +1981,7 @@ bool LinuxPlatform::Init() if (sched_getaffinity(0, sizeof(cpus), &cpus) == 0) { int32 numberOfCores = 0; - struct CpuInfo + struct CpuData { int32 Core; int32 Package;