about summary refs log tree commit diff stats
path: root/miasm/core/bin_stream.py
diff options
context:
space:
mode:
authorPsyi Rius <99079175+psyirius@users.noreply.github.com>2024-04-28 02:14:16 +0530
committerGitHub <noreply@github.com>2024-04-28 02:14:16 +0530
commite7f84596810d5ff71ed67e236b5889a5f479de7e (patch)
tree1b664193ed55b1454cf728f9e0122dfcad74c693 /miasm/core/bin_stream.py
parent0fffa143ce89d8ece7d6a705afc0a1fefd16896a (diff)
downloadfocaccia-miasm-e7f84596810d5ff71ed67e236b5889a5f479de7e.tar.gz
focaccia-miasm-e7f84596810d5ff71ed67e236b5889a5f479de7e.zip
fix: bin_stream get_u8 returning bytes
Diffstat (limited to 'miasm/core/bin_stream.py')
-rw-r--r--miasm/core/bin_stream.py5
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):
         """