Skip to content

Commit 2fd4eff

Browse files
fix: update comment handling in render-binja-import-script.py
- ret of get_comment_at is str + set_comment is unkown in ver5.2
1 parent 39c2243 commit 2fd4eff

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

scripts/render-binja-import-script.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ def render_binja_script(result_document: ResultDocument) -> str:
7676
7777
def AppendComment(ea, s):
7878
79-
s = s.encode('ascii')
8079
refAddrs = []
8180
for ref in bv.get_code_refs(ea):
8281
refAddrs.append(ref)
@@ -100,7 +99,6 @@ def AppendLvarComment(fva, s):
10099
101100
# stack var comments are not a thing in Binary Ninja so just add at top of function
102101
# and at location where it's used as an arg
103-
s = s.encode('ascii')
104102
fn = bv.get_function_at(fva)
105103
106104
for addr in [fva, pc]:
@@ -113,7 +111,7 @@ def AppendLvarComment(fva, s):
113111
return
114112
string = string + "\\n" + s
115113
116-
fn.set_comment(addr, string)
114+
fn.set_comment_at(addr, string)
117115
118116
print("Annotating %d strings from FLOSS for %s")
119117
%s

0 commit comments

Comments
 (0)