diff options
| author | Psyi Rius <99079175+psyirius@users.noreply.github.com> | 2024-04-28 02:14:16 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-28 02:14:16 +0530 |
| commit | e7f84596810d5ff71ed67e236b5889a5f479de7e (patch) | |
| tree | 1b664193ed55b1454cf728f9e0122dfcad74c693 | |
| parent | 0fffa143ce89d8ece7d6a705afc0a1fefd16896a (diff) | |
| download | miasm-e7f84596810d5ff71ed67e236b5889a5f479de7e.tar.gz miasm-e7f84596810d5ff71ed67e236b5889a5f479de7e.zip | |
fix: bin_stream get_u8 returning bytes
| -rw-r--r-- | miasm/core/bin_stream.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/miasm/core/bin_stream.py b/miasm/core/bin_stream.py index 9224053f..46165d49 100644 --- a/miasm/core/bin_stream.py +++ b/miasm/core/bin_stream.py @@ -124,7 +124,10 @@ class bin_stream(object): 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): """ |