]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - libiberty/pex-win32.c
Sync libiberty sources with gcc mainline.
[thirdparty/binutils-gdb.git] / libiberty / pex-win32.c
index 66d2f1157c730ae99e62a2e2b4be20437c43af52..4c15b0d11a0e0b89ec3e188b57020b55aebed8dc 100644 (file)
@@ -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)
         {