summaryrefslogtreecommitdiff
path: root/python/architecture.py
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2019-01-22 00:56:52 -0500
committerJordan Wiens <jordan@psifertex.com>2019-01-22 00:56:52 -0500
commite4bcabe6035c279502b1bf29d5b2bb431676fdc6 (patch)
treedf8d68c4c8d24fd54257e029cb31918227a9e642 /python/architecture.py
parent245f503ad9ead9257f7d4b8932a86fa9064b5b59 (diff)
fixes #1253 for get_instruction_text
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)