Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CraftSpider committed Sep 7, 2024
1 parent 7d75a04 commit 925061e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/symbolize/gimli/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,15 @@ fn locate_build_id(build_id: &[u8]) -> Option<PathBuf> {

let mut path =
String::with_capacity(BUILD_ID_PATH.len() + BUILD_ID_SUFFIX.len() + build_id.len() * 2 + 1);
path.extend(BUILD_ID_PATH);
path.push_str(BUILD_ID_PATH);
path.push(char::from_digit((build_id[0] >> 4) as u32, 16)?);
path.push(char::from_digit((build_id[0] & 0xf) as u32, 16)?);
path.push('/');
for byte in &build_id[1..] {
path.push(char::from_digit((byte >> 4) as u32, 16)?);
path.push(char::from_digit((byte & 0xf) as u32, 16)?);
}
path.extend(BUILD_ID_SUFFIX);
path.push_str(BUILD_ID_SUFFIX);
Some(PathBuf::from(path))
}

Expand Down

0 comments on commit 925061e

Please sign in to comment.