mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-29 23:23:07 +00:00
- Fixed the wrong handling of empty command line argument.
This commit is contained in:
parent
9a94613f55
commit
ea29e45ef5
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