Skip to content

Commit

Permalink
Revert "Fix data tooltip panic"
Browse files Browse the repository at this point in the history
This reverts commit 462453c.
  • Loading branch information
SquareMan committed Oct 15, 2024
1 parent 462453c commit 5592a15
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions objdiff-core/src/arch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,9 @@ pub enum DataType {

impl DataType {
pub fn display_bytes<Endian: ByteOrder>(&self, bytes: &[u8]) -> Option<String> {
let Some(required_len) = self.required_len() else {
if self.required_len().is_some_and(|l| bytes.len() < l) {
return None;
};
// TODO: For symbols larger than their data type, we should probably support
// using the relocation's relative offset to read the bytes.
let bytes = bytes.get(0..required_len)?;
}

match self {
DataType::Int8 => {
Expand Down

0 comments on commit 5592a15

Please sign in to comment.