Skip to content

Commit 260d6f2

Browse files
committed
Try to fix weird windows error?
1 parent 1285a0e commit 260d6f2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

vm/src/stdlib/winapi.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ fn _winapi_CreateProcess(
130130
args: CreateProcessArgs,
131131
vm: &VirtualMachine,
132132
) -> PyResult<(usize, usize, u32, u32)> {
133-
let mut si: winbase::STARTUPINFOEXW = unsafe { std::mem::zeroed() };
134-
si.StartupInfo.cb = std::mem::size_of_val(&si) as _;
133+
use winbase::STARTUPINFOEXW;
134+
let mut si: STARTUPINFOEXW = unsafe { std::mem::zeroed() };
135+
si.StartupInfo.cb = 84; // std::mem::size_of::<STARTUPINFOEXW>() as _;
135136

136137
macro_rules! si_attr {
137138
($attr:ident, $t:ty) => {{
@@ -206,7 +207,7 @@ fn _winapi_CreateProcess(
206207
| winbase::CREATE_UNICODE_ENVIRONMENT,
207208
env as _,
208209
current_dir,
209-
&mut si as *mut winbase::STARTUPINFOEXW as _,
210+
&mut si as *mut STARTUPINFOEXW as _,
210211
&mut procinfo,
211212
)
212213
};

0 commit comments

Comments
 (0)