mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
- Fixed the wrong handling of empty command line argument.
This commit is contained in:
parent
5396e8d07d
commit
815a440014
1 changed files with 5 additions and 1 deletions
|
@ -1040,7 +1040,11 @@ FString BuildString (int argc, FString *argv)
|
|||
|
||||
for (arg = 0; arg < argc; arg++)
|
||||
{
|
||||
if (strchr(argv[arg], '"'))
|
||||
if (argv[arg][0] == '\0')
|
||||
{ // It's an empty argument, we need to convert it to '""'
|
||||
buf << "\"\" ";
|
||||
}
|
||||
else if (strchr(argv[arg], '"'))
|
||||
{ // If it contains one or more quotes, we need to escape them.
|
||||
buf << '"';
|
||||
long substr_start = 0, quotepos;
|
||||
|
|
Loading…
Reference in a new issue