aboutsummaryrefslogtreecommitdiff
path: root/libiberty/pex-win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/pex-win32.c')
-rw-r--r--libiberty/pex-win32.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c
index 66d2f1157c7..4c15b0d11a0 100644
--- a/libiberty/pex-win32.c
+++ b/libiberty/pex-win32.c
@@ -370,6 +370,8 @@ argv_to_cmdline (char *const *argv)
cmdline_len++;
}
}
+ if (j == 0)
+ needs_quotes = 1;
/* Trailing backslashes also need to be escaped because they will be
followed by the terminating quote. */
if (needs_quotes)
@@ -394,6 +396,8 @@ argv_to_cmdline (char *const *argv)
break;
}
}
+ if (j == 0)
+ needs_quotes = 1;
if (needs_quotes)
{