diff options
-rw-r--r-- | win32/process.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/win32/process.c b/win32/process.c index cdd71182b..3ce152c45 100644 --- a/win32/process.c +++ b/win32/process.c | |||
@@ -95,6 +95,8 @@ quote_arg(const char *arg) | |||
95 | } | 95 | } |
96 | if (*p == '"') | 96 | if (*p == '"') |
97 | n += count*2 + 1; | 97 | n += count*2 + 1; |
98 | else | ||
99 | n += count; | ||
98 | continue; | 100 | continue; |
99 | } | 101 | } |
100 | len++; | 102 | len++; |
@@ -115,9 +117,9 @@ quote_arg(const char *arg) | |||
115 | count++; | 117 | count++; |
116 | *d++ = *arg++; | 118 | *d++ = *arg++; |
117 | } | 119 | } |
120 | while (count-- > 0) | ||
121 | *d++ = '\\'; | ||
118 | if (*arg == '"') { | 122 | if (*arg == '"') { |
119 | while (count-- > 0) | ||
120 | *d++ = '\\'; | ||
121 | *d++ = '\\'; | 123 | *d++ = '\\'; |
122 | } | 124 | } |
123 | } | 125 | } |