Skip to content

Commit

Permalink
Merge pull request #1487 from psyirius/fix-ida-bs-get-u8
Browse files Browse the repository at this point in the history
Fix: `bin_stream::get_u8` method returning bytes
  • Loading branch information
serpilliere authored Aug 20, 2024
2 parents 243e4f0 + e7f8459 commit cbc722e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion miasm/core/bin_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ def get_u8(self, addr, endianness=None):
if endianness is None:
endianness = self.endianness
data = self.getbytes(addr, 1)
return data
if endianness == LITTLE_ENDIAN:
return upck8le(data)
else:
return upck8be(data)

def get_u16(self, addr, endianness=None):
"""
Expand Down

0 comments on commit cbc722e

Please sign in to comment.