diff options
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/subprocess-win.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/osdep/subprocess-win.c b/osdep/subprocess-win.c index 211f407db1..7ea6d39cba 100644 --- a/osdep/subprocess-win.c +++ b/osdep/subprocess-win.c @@ -30,6 +30,12 @@ static void write_arg(bstr *cmdline, char *arg) { + // Empty args must be represented as an empty quoted string + if (!arg[0]) { + bstr_xappend(NULL, cmdline, bstr0("\"\"")); + return; + } + // If the string doesn't have characters that need to be escaped, it's best // to leave it alone for the sake of Windows programs that don't process // quoted args correctly. |