diff options
| author | Xusheng <xusheng@vector35.com> | 2020-08-31 17:53:02 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2020-09-03 21:14:41 +0800 |
| commit | aa407ca14f6a99c5a953ff564461ec8dac1e0a84 (patch) | |
| tree | 6c0e699b434893b1b8dc01702c114f348828c34d /python | |
| parent | c1b11a0085c780ac3d5e3400a31ad939b376ede3 (diff) | |
allow redefining an existing type
Diffstat (limited to 'python')
| -rw-r--r-- | python/binaryview.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index abcc5f49..2c20a694 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -4623,7 +4623,9 @@ class BinaryView(object): raise AttributeError("Source must be a string") result = core.BNQualifiedNameAndType() errors = ctypes.c_char_p() - if not core.BNParseTypeString(self.handle, text, result, errors): + type_list = core.BNQualifiedNameList() + type_list.count = 0 + if not core.BNParseTypeString(self.handle, text, result, errors, type_list): error_str = errors.value.decode("utf-8") core.BNFreeString(ctypes.cast(errors, ctypes.POINTER(ctypes.c_byte))) raise SyntaxError(error_str) |
