We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 112f6d6 + 4b732b9 commit 6ba872cCopy full SHA for 6ba872c
git-extra/git-credential-helper-selector.c
@@ -291,7 +291,8 @@ static LPWSTR quote(LPWSTR string)
291
while (end[1] == L'\\')
292
end++;
293
len += end - p;
294
- if (end[1] == L'"')
+ if (end[1] == L'"' ||
295
+ (needs_quotes && end[1] == L'\0'))
296
len += end - p + 1;
297
p = end;
298
}
@@ -313,7 +314,7 @@ static LPWSTR quote(LPWSTR string)
313
314
memcpy(q, p, (end - p) * sizeof(WCHAR));
315
q += end - p;
316
- if (end[1] == L'"') {
317
+ if (end[1] == L'"' || end[1] == L'\0') {
318
memcpy(q, p, (end - p + 1) * sizeof(WCHAR));
319
q += end - p + 1;
320
0 commit comments