Skip to content

Commit 109ac8f

Browse files
borsgitbot
authored and
gitbot
committed
Auto merge of rust-lang#136227 - fmease:rollup-ewpvznh, r=fmease
Rollup of 9 pull requests Successful merges: - rust-lang#136121 (Deduplicate operand creation between scalars, non-scalars and string patterns) - rust-lang#136134 (Fix SIMD codegen tests on LLVM 20) - rust-lang#136153 (Locate asan-odr-win with other sanitizer tests) - rust-lang#136161 (rustdoc: add nobuild typescript checking to our JS) - rust-lang#136166 (interpret: is_alloc_live: check global allocs last) - rust-lang#136168 (GCI: Don't try to eval / collect mono items inside overly generic free const items) - rust-lang#136170 (Reject unsound toggling of Arm atomics-32 target feature) - rust-lang#136176 (Render pattern types nicely in mir dumps) - rust-lang#136186 (uefi: process: Fix args) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 8d2b87f + f22a833 commit 109ac8f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

std/src/sys/pal/uefi/process.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ mod uefi_command_internal {
460460
helpers::open_protocol(self.handle, loaded_image::PROTOCOL_GUID).unwrap();
461461

462462
let len = args.len();
463-
let args_size: u32 = crate::mem::size_of_val(&args).try_into().unwrap();
463+
let args_size: u32 = (len * crate::mem::size_of::<u16>()).try_into().unwrap();
464464
let ptr = Box::into_raw(args).as_mut_ptr();
465465

466466
unsafe {
@@ -706,9 +706,10 @@ mod uefi_command_internal {
706706
res.push(QUOTE);
707707
res.extend(prog.encode_wide());
708708
res.push(QUOTE);
709-
res.push(SPACE);
710709

711710
for arg in args {
711+
res.push(SPACE);
712+
712713
// Wrap the argument in quotes to be treat as single arg
713714
res.push(QUOTE);
714715
for c in arg.encode_wide() {
@@ -719,8 +720,6 @@ mod uefi_command_internal {
719720
res.push(c);
720721
}
721722
res.push(QUOTE);
722-
723-
res.push(SPACE);
724723
}
725724

726725
res.into_boxed_slice()

0 commit comments

Comments
 (0)