diff --git a/src/trampolines/windows-trampolines/posy-trampoline/src/bounce.rs b/src/trampolines/windows-trampolines/posy-trampoline/src/bounce.rs index 80b73ab..dfa883e 100644 --- a/src/trampolines/windows-trampolines/posy-trampoline/src/bounce.rs +++ b/src/trampolines/windows-trampolines/posy-trampoline/src/bounce.rs @@ -67,7 +67,7 @@ fn find_python_exe(is_gui: bool) -> CString { // MAX_PATH is a lie, Windows paths can be longer. // https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation // But it's a good first guess, usually paths are short and we should only need a single attempt. - buffer.resize(MAX_PATH as usize, 0); + let mut buffer: Vec = vec![0; MAX_PATH as usize]; loop { // Call the Windows API function to get the module file name let len = GetModuleFileNameA(0, buffer.as_mut_ptr(), buffer.len() as u32);