summaryrefslogtreecommitdiff
path: root/python/architecture.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/architecture.py')
-rw-r--r--python/architecture.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/architecture.py b/python/architecture.py
index b9d21a90..1df60a5d 100644
--- a/python/architecture.py
+++ b/python/architecture.py
@@ -2308,6 +2308,11 @@ class CoreArchitecture(Architecture):
:return: an InstructionTextToken list for the current instruction
:rtype: list(InstructionTextToken)
"""
+ if not isinstance(data, bytes):
+ if isinstance(data, str):
+ data=data.encode()
+ else:
+ raise TypeError("Must be bytes or str")
count = ctypes.c_ulonglong()
length = ctypes.c_ulonglong()
length.value = len(data)