mirror of https://github.com/mpv-player/mpv
subprocess-win: handle empty arguments correctly
This commit is contained in:
parent
3f4e154ec6
commit
54cc610fde
|
@ -30,6 +30,12 @@
|
||||||
|
|
||||||
static void write_arg(bstr *cmdline, char *arg)
|
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
|
// 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
|
// to leave it alone for the sake of Windows programs that don't process
|
||||||
// quoted args correctly.
|
// quoted args correctly.
|
||||||
|
|
Loading…
Reference in New Issue