We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 462453c commit 5592a15Copy full SHA for 5592a15
objdiff-core/src/arch/mod.rs
@@ -34,12 +34,9 @@ pub enum DataType {
34
35
impl DataType {
36
pub fn display_bytes<Endian: ByteOrder>(&self, bytes: &[u8]) -> Option<String> {
37
- let Some(required_len) = self.required_len() else {
+ if self.required_len().is_some_and(|l| bytes.len() < l) {
38
return None;
39
- };
40
- // TODO: For symbols larger than their data type, we should probably support
41
- // using the relocation's relative offset to read the bytes.
42
- let bytes = bytes.get(0..required_len)?;
+ }
43
44
match self {
45
DataType::Int8 => {
0 commit comments