diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2019-01-22 00:56:52 -0500 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2019-01-22 00:56:52 -0500 |
| commit | e4bcabe6035c279502b1bf29d5b2bb431676fdc6 (patch) | |
| tree | df8d68c4c8d24fd54257e029cb31918227a9e642 /python | |
| parent | 245f503ad9ead9257f7d4b8932a86fa9064b5b59 (diff) | |
fixes #1253 for get_instruction_text
Diffstat (limited to 'python')
| -rw-r--r-- | python/architecture.py | 5 |
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) |
