From e4bcabe6035c279502b1bf29d5b2bb431676fdc6 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Tue, 22 Jan 2019 00:56:52 -0500 Subject: fixes #1253 for get_instruction_text --- python/architecture.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'python/architecture.py') 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) -- cgit v1.3.1