summaryrefslogtreecommitdiff
path: root/python/examples
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2022-10-12 19:33:11 +0800
committerXusheng <xusheng@vector35.com>2022-10-12 19:33:11 +0800
commitdaf1569966f6fe06cf98de9059209aef6949ed81 (patch)
tree16f8359d0c251fb8538cd435c6abdd663880779c /python/examples
parentc398bd1ea423f1f9a4fa9e6e3fcadc9143a99f99 (diff)
Let "make code" become first-class feature. Fix https://github.com/Vector35/binaryninja-api/issues/1404.
Diffstat (limited to 'python/examples')
-rw-r--r--python/examples/make_code.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/examples/make_code.py b/python/examples/make_code.py
index 0f2d2feb..3e0f14d0 100644
--- a/python/examples/make_code.py
+++ b/python/examples/make_code.py
@@ -44,7 +44,7 @@ def make_code(bv: BinaryView, start: int, end: int) -> None:
end = min(seg.end, end)
section_ends = [s.end for s in bv.get_sections_at(start)]
end = min(*section_ends, end)
- bv.define_data_var(start, Type.array(Type.int(1, False), end-start), f"CODE_{start:08x}")
+ bv.define_user_data_var(start, Type.array(Type.int(1, False), end-start), f"CODE_{start:08x}")
def make_code_helper(ctx: UIActionContext):
make_code(ctx.binaryView, ctx.address, ctx.address + ctx.length)