Skip to content

Commit f26c931

Browse files
committed
Restore set_len.
1 parent 698409a commit f26c931

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/symbolize/gimli/libs_windows.rs

+2
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)