diff options
| author | Peter LaFosse <peter@vector35.com> | 2019-08-08 21:53:09 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2019-08-08 21:53:41 -0400 |
| commit | a108973c0d3528cd8cda1219611b4946d9938832 (patch) | |
| tree | c0290751cef5a6f4b0d1c6e570e25164f28500ce /python/binaryview.py | |
| parent | 55879123572902a75153bf9fa6b8a84665c5ffc7 (diff) | |
Fix python3 issue with BinaryWriter.write
Diffstat (limited to 'python/binaryview.py')
| -rw-r--r-- | python/binaryview.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index fc6b816d..199e8015 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -47,7 +47,7 @@ from binaryninja import settings # 2-3 compatibility from binaryninja import range from binaryninja import with_metaclass - +from binaryninja import cstr class BinaryDataNotification(object): def __init__(self): @@ -5335,7 +5335,8 @@ class BinaryWriter(object): 'AAAA' >>> """ - value = str(value) + + value = cstr(value) buf = ctypes.create_string_buffer(len(value)) ctypes.memmove(buf, value, len(value)) return core.BNWriteData(self.handle, buf, len(value)) |
