ntspawn: fix initializing NtStartupInfoEx (#1190)

This commit is contained in:
Gavin Hayes 2024-05-26 20:54:09 -04:00 committed by GitHub
parent c68f6599e5
commit 0a51241f7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -177,9 +177,9 @@ static textwindows int ntspawn2(struct NtSpawnArgs *a, struct SpawnBlock *sb) {
if (ok) {
struct NtStartupInfoEx info = {
.StartupInfo = *a->lpStartupInfo,
.StartupInfo.cb = sizeof(info),
.lpAttributeList = alist,
};
info.StartupInfo.cb = sizeof(info);
if (ok) {
if (CreateProcess(sb->path, sb->cmdline, 0, 0, true,
a->dwCreationFlags | kNtCreateUnicodeEnvironment |