gh-95285: py.exe launcher fails with short argv0 (GH-95295) (GH-95298)

(cherry picked from commit 7ac5bb3e6a)

Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
Miss Islington (bot) 2022-07-27 01:06:59 -07:00 committed by GitHub
parent 0d812a58a7
commit 7df3a1ce4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 3 deletions

View file

@ -580,6 +580,9 @@ parseCommandLine(SearchInfo *search)
break;
}
}
if (tail == search->originalCmdLine && tail[0] == L'"') {
++tail;
}
// Without special cases, we can now fill in the search struct
int tailLen = (int)(end ? (end - tail) : wcsnlen_s(tail, MAXLEN));
search->executableLength = -1;