Skip to content

Commit 301f1c3

Browse files
committed
Restore set_len.
1 parent eee431e commit 301f1c3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/symbolize/gimli/libs_windows.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ unsafe fn get_posix_path(long_path: &[u16]) -> Option<OsString> {
9494
if res != 0 {
9595
return None;
9696
}
97+
// Remove the null terminator.
98+
unsafe { name_buffer.set_len(name_len - 1) };
9799
let name = OsString::from_vec(name_buffer);
98100
Some(name)
99101
}

0 commit comments

Comments
 (0)